Reputation: 67
{
"compilerOptions" : {
"target": "ES3",
"module": "ES2015",
"declaration": false,
"sourceMap": true,
"outDir": "./dist",
"rootDir": "./src",
"watch": true
},
"include": [
"src/**/*"
]
}
Upvotes: 4
Views: 10957
Reputation: 1
Add them to config.json
, then append the .ts
extension after every import.
{
"noEmit": true,
"allowImportingTsExtensions": true
}
Upvotes: 0
Reputation: 501
I also had the same issue.
I removed src in tsconfig
after compilerOptions
property. Then tsc
command started showing type errors and imports.
Upvotes: 0
Reputation: 4770
You need to add noEmitOnError: true
in your tsconfig.json.
This flag controls if the typescript compiler should generate output files if any errors were reported. And by default it is false, meaning the compiler will still emit output files even when there are errors.
https://www.typescriptlang.org/tsconfig#noEmitOnError
Upvotes: 9