This application was originally written in Angular 6 but has been upgraded to Angular 13 - Actually had to create Angular 13 project and then add all the code files components, templates, etc. In the tsconfig.json, which looks like:
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"strict": false, //true
"noImplicitOverride": false, //true
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": false,//true
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "es2017",
"module": "es2020",
"lib": [
"es2020",
"dom"
]
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
}
Three of the elements namely strict, noImplicitOverride, noImplicitReturns I had to set to false to make it work. After I had success in compiling the application, now I'm trying to set it back to strict: true and working through the errors. I cannot figure out how to initialize
public formGroup: FormGroup;
since it is an object, I tried to use new, but that doesn't help
It is using "typescript": "~4.6.2" Please advise
P.S. There are many such errors, so just wondering if setting strict as true is a good idea or not Please advise