After upgrading Typescript to version 4.8.2, I started encountering the error "Class is using Angular features but is not decorated" in all of my Angular components.
This error specifically appears on the export class name of each component.
Has anyone else faced this issue before?
@Component({
selector: "app-members",
templateUrl: "./members.component.html",
styleUrls: ["./members.component.scss"]
})
export class MembersComponent implements OnInit {...
In the provided example, the "MembersComponent" is triggering the error.
Here's a snippet from my tsconfig.json :
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": ".",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "esnext",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"noUnusedLocals": false,
"target": "ES2021",
"forceConsistentCasingInFileNames": true,
"typeRoots": [
"node_modules/@types"
],
"lib": [
"ES2021.String",
"ES2021",
"dom"
]
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"preserveWhitespaces": true,
"strictTemplates": true
}
}