Reputation: 46940
I just installed Angular 10 and upgraded VSCode to the latest.
When creating a new module:
import { NgModule } from '@angular/core';
const mm = []
@NgModule({
imports: [ ...mm ],
exports: [...mm
],
providers: [
]
})
export class MaterialModule {
}
This decorator error is created:
class MaterialModule
Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.ts(1219)
And it is only created for the new module. The existing app.module.ts
is error free...so it's a bit confusing.
Upvotes: 1
Views: 605
Reputation: 2132
Add this line in your tslint.config to avoid this lint error.
"experimentalDecorators": true
and also checked the enable experimental decorator option in visual studio setting like below
Hope it will help.
Upvotes: 6
Reputation: 46940
I uninstalled and reinstalled "Angular Language Support" in VSCode and that did the trick.
Upvotes: 0