I'm running into this issue and I'd like to turn off strict mode to get around it.
I've modified tsconfig.json
with:
"compilerOptions": {
"strict": false,
And also tried:
"compilerOptions": {
"noImplicitUseStrict": true,
But no love. Thoughts?
Disable strict checks entirely by setting strictTemplates: false in the application's TypeScript configuration file, tsconfig. json. Disable certain type-checking operations individually, while maintaining strictness in other aspects, by setting a strictness flag to false.
You can do that by compiling with the --noImplicitUseStrict compiler option—add "noImplicitUseStrict": true to "compilerOptions" in tsconfig. json. Doing so will prevent the compiler from emitting "use strict" .
Strict modelink Strict mode improves maintainability and helps you catch bugs ahead of time. Additionally, strict mode applications are easier to statically analyze and can help the ng update command refactor code more safely and precisely when you are updating to future versions of Angular.
TypeScript strict mode is a bunch of TypeScript compiler parameters (that can be also be represented by one “main” parameter) that make TypeScript compiler tsc force you to follow specific rules of writing code in TypeScript. All these rules are directly related to types and managing types in the TypeScript code.
Following Angular doc, the strict mode can be disabled turning off these flags on tsconfig.json file:
"forceConsistentCasingInFileNames": false,
"strict": false,
"noImplicitReturns": false,
"noFallthroughCasesInSwitch": false,
...
"angularCompilerOptions": {
"strictInjectionParameters": false,
"strictInputAccessModifiers": false,
"strictTemplates": false
}
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