0
重現步驟:
1)npm install @types/mocha @types/jasmine
2)tsc
打字稿2點定義爲摩卡,茉莉導致重複標識
node_modules/@types/jasmine/index.d.ts(9,18): error TS2300: Duplicate identifier 'describe'.
node_modules/@types/jasmine/index.d.ts(11,18): error TS2300: Duplicate identifier 'xdescribe'.
...
node_modules/@types/mocha/index.d.ts(33,13): error TS2300: Duplicate identifier 'describe'.
node_modules/@types/mocha/index.d.ts(34,13): error TS2300: Duplicate identifier 'xdescribe'.
...
我的項目結構:
node_modules
test.ts
tsconfig.json
我的代碼:
const a: number = 9;
我tsconfig.json:
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node"
}
}