There are some Vscode tips "module not found" when declare module in d.ts dependency an third party module by import, is there any solution for it?
tsconfig.json
{
"compilerOptions": {
"outDir": "./dist/",
"target": "es5",
"lib": ["esnext", "dom.iterable","dom", "scripthost", "es2015.symbol"],
"sourceMap": true,
"noImplicitAny": true,
"jsx": "react",
"allowSyntheticDefaultImports": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"allowJs": true,
"module": "commonjs",
"isolatedModules": false,
"esModuleInterop": true
},
"include": ["src/**/*","typings/*"],
"exclude": ["node_modules"]
}
typings/index.d.ts
import * as moment from 'moment';
declare module 'someModule' {
export function test(x: string): moment.CalendarKey;
}
but without import works fine
declare module 'someModule' {
export function test(x: string): string;
}
what's problem?

