function test(){
return 1;
}
为什么此类测试用例在使用 tsc 转换时会报告重复定义,如下 ** node_modules/@types/mocha/index.d.ts:2620:13 - error TS2300: Duplicate identifier 'test'。
2620 声明 var 测试:Mocha.TestFunction;~~~~
test2.ts:1:10 1 function test(){ ~~~~ 'test' 也在这里声明。
test2.ts:1:10 - 错误 TS2300:重复的标识符“测试”。
1 函数 test(){ ~~~~
node_modules/@types/mocha/index.d.ts:2620:13 2620 声明 var test: Mocha.TestFunction; ~~~~ 'test' 也在这里声明。
发现2个错误。**