I'm using TypeScript version 1.8.10 in Visual Studio 2015.
In tsconfig.json I have those settings as
"compilerOptions": {
"target": "es6",
"module": "system",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": true,
"noImplicitAny": true,
"noEmitOnError": false,
"noImplicitUseStrict": false,
"declaration": false,
"inlineSourceMap": true,
"inlineSources": true
},
I'm wondering is is there a setting that disallow the use of "any" and force us to use datatype such as number, string, etc. instead of "any"?
You could use TSLint in conjunction with TypeScript and set the no-any
flag. See https://www.npmjs.com/package/tslint
There's also ESLint with the no-explicit-any
rule.
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