使用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
};
由于