a.ts
b.ts
import a = require('./a');
tsconfig.json
{
"files": [
"./a.ts",
"./b.ts"
]
}
node ./node_modules/typescript/lib/tsc.js --outDir ./commonjs --module commonjs --target es5 --declaration --noResolve --noEmitOnError --noImplicitAny
gives:
b.ts(1,20): error TS2307: Cannot find module './a'.
a.ts
b.ts
tsconfig.json
{ "files": [ "./a.ts", "./b.ts" ] }gives: