[英]VSCode Experimental Support for Decorators Warning When Trying to Create New Module
I just installed Angular 10 and upgraded VSCode to the latest.我刚刚安装了 Angular 10 并将 VSCode 升级到最新。
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.现有的
app.module.ts
没有错误……所以有点混乱。
I uninstalled and reinstalled "Angular Language Support" in VSCode and that did the trick.我在 VSCode 中卸载并重新安装了“Angular Language Support”,就成功了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.