Skip to content
This repository has been archived by the owner on Feb 17, 2024. It is now read-only.

Warning of experimental support for decorators #4

Open
philjones88 opened this issue May 24, 2017 · 7 comments
Open

Warning of experimental support for decorators #4

philjones88 opened this issue May 24, 2017 · 7 comments

Comments

@philjones88
Copy link
Contributor

severity: 'Error'
message: 'Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.'

@Hendrixer
Copy link
Member

are you getting this error in VS code? or build time? I believe it has to do with the files array in the tsconfig and not putting in a rootDir in there are well.

@philjones88
Copy link
Contributor Author

In VS Code (insiders).

I don't get this on other projects where I used your angular-starter project so maybe it's a difference in the tsconfig files?

https://github.com/AngularClass/angular-starter/blob/master/tsconfig.json

@Hendrixer
Copy link
Member

right, i can confirm it has to do with the lack of "rootDir" in the tsconfig

@philjones88
Copy link
Contributor Author

I don't know if that's right? I use the angular-starter tsconfig.json in our product and we don't get this warning? Let me test what settings from the angular-starter tsconfig.json fix it :)

@Hendrixer
Copy link
Member

in my case it was. The real issue is when you have a file not being included by the tsconfig. This can be from rootDir, excludes, or files.

@philjones88
Copy link
Contributor Author

I can't replicate it tonight. VS Code has now decided that in lib.component.ts that the template property is missing even though it's right there! :(

file: 'file:///Users/phil/Documents/Projects/lib-starter/src/lib.component.ts'
severity: 'Error'
message: 'Component LibComponent must have a template or templateUrl'
at: '3,2'
source: 'Angular'

@AlirezaEbrahimkhani
Copy link

In VSCode, Go to File => Preferences => Settings (or Control+comma) and it will open the User Settings file. Add "javascript.implicitProjectConfig.experimentalDecorators": true to the file and it should fix it. It did for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants