【发布时间】:2018-09-11 20:47:48
【问题描述】:
使用 TypeScript 2.8,我们现在可以仅从源文件生成 .d.ts。所以我的 tsconfig.json 变成了:
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"module": "commonjs",
"target": "es5",
"lib": ["ES6","ES2017","ESNext"],
"downlevelIteration": true,
"moduleResolution": "node",
"declaration": true,
"emitDeclarationOnly": true,
"declarationDir": "./lib"
},
"exclude": [
"node_modules"
],
"include": [
"src/**/*"
],
"strict": true
}
问题是构建被破坏了(https://travis-ci.org/jy95/mediaScan/jobs/359573738)。 我的回购:https://github.com/jy95/mediaScan/tree/prettier
任何想法如何解决它?
我的 jest.config.js :
// jest.config.js
module.exports = {
verbose: true,
"moduleFileExtensions": [
"ts",
"tsx",
"js"
],
"transform": {
"^.+\\.tsx?$": "ts-jest"
},
"testMatch": [
"<rootDir>/__tests__/**/*.(ts|tsx|js)"
],
"testPathIgnorePatterns": ["<rootDir>/node_modules/", "<rootDir>/__tests__/__helpers__/"],
"collectCoverage": true
};
谢谢
【问题讨论】:
标签: node.js typescript babeljs jestjs