i'm facing with the following error error TS6044: Compiler option 'types' expects an argument.
when trying to set "types": []
in tsconfig.json.
We are using grunt-ts
This is recommended by official TS documentation in order to get rid of the following errors: node_modules/@types/angular/index.d.ts(14,9): error TS2403
Here is the link to TS documentation
Specify "types": [] to disable automatic inclusion of @types packages.
But instead of disabling automatic inclusion of @types i see error error TS6044: Compiler option 'types' expects an argument.
Can someone help me?
The tsc command envokes the TypeScript compiler. When no command-line options are present, this command looks for the tsconfig. json file. If no tsconfig.
By default, TS compiler outputs transpiled files to the same directory where the original TS files is found. However, this can be changed using outDir compiler option. Now, when we run tsc all output will copied into dist folder preserving the original directory structure.
I would recommend using tsconfig.json passthrough with that parameter and grunt-ts. Several of the new features in the TypeScript 2.x timeframe don't work very well or at all from the command-line. Alternatively, you could try using the additionalFlags feature of grunt-ts and pass "" as the types value. I'm not near a computer to test that, but it could work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With