Full Stack Developer Blog

Just The Programming Blog

Resolving ‘Error TS1219’ in Angular Build: Handling Experimental Decorators in Visual Studio 2022

A few weeks back, I encountered a build issue accompanied by the following error:

As you can see it happened due to the @Injectable() decorator:

Error TS1219 Handling Experimental Decorators in Visual Studio 2022

It took half a day to resolve the issue 🤪. And you need just to configure your csproj file by adding the next section :

Hope it was helpful to you.

My Artifacts are:

  • Visual Studio 2022
  • Angular Project based on Console Application(template)
  • Angular version 13.1.1
  • tsconfig.json, the experimentalDecorators set true

Leave a Comment Cancel reply

Save my name, email, and website in this browser for the next time I comment.

Navigation Menu

Search code, repositories, users, issues, pull requests..., provide feedback.

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly.

To see all available qualifiers, see our documentation .

  • Notifications You must be signed in to change notification settings

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for "experimentalDecorators: false" in TypeScript configuration file #56146

@jordimarimon

jordimarimon commented May 29, 2024 • edited Loading

Jordimarimon commented may 29, 2024.

Sorry, something went wrong.

@jordimarimon

angular-automatic-lock-bot bot commented Jun 29, 2024

@angular-automatic-lock-bot

No branches or pull requests

@jordimarimon

  • Career Model
  • Proactive Mentorship
  • Productivity
  • Review Model
  • Work:Life Balance
  • 3D Printing
  • Announcements
  • Conferences

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

With this code:

I kept getting this VS Code error:

Experimental support for decorators is a feature that is subject to change in a future release. Set the ‘experimentalDecorators’ option to remove this warning.

angular error experimental decorators

Even though I have experimentalDecorators set to true in my tsconfig

Turns out I had the parent folder open in VS Code,

\code\project\

But I needed to have the actual project as my root in VS Code

\code\project\app

For this error to go away.

I tried copying the tsconfig into the root folder, but that didn’t help.

So, If you want this error to go away, then make sure you have that setting set to true in your tsconfig and also make sure you have the app open at the right level.

IMAGES

  1. angular

    angular error experimental decorators

  2. 解决angular报错[ts] Experimental support for decorators is a feature that

    angular error experimental decorators

  3. visual studio

    angular error experimental decorators

  4. angular

    angular error experimental decorators

  5. 解决angular报错[ts] Experimental support for decorators is a feature that

    angular error experimental decorators

  6. angular

    angular error experimental decorators

VIDEO

  1. Angular (урок 5)

  2. W POSZUKIWANIU TAJEMNICZEJ POSTACI ERROR422 W MINECRAFT

  3. Learn RxJS Error Handling in Angular

  4. Experimental Error

  5. Fix : 03000086:digital envelope routines::initialization error

  6. 65. Implement Property Validation Decorators in the TypeScript