Unable to use JS decorators in private methods with the development build #61228
Labels
area: compiler
Issues related to `ngc`, Angular's template compiler
freq1: low
state: has PR
type: bug/fix
Milestone
Command
build
Is this a regression?
The previous version in which this bug was not present was
19.2.6
Description
When building with the default development configuration, if one is using JS decorators in a private method (not the experimental ones from TypeScript,
experimentalDecorators: false
) gets the following error:If the method is public, the error doesn't happen.
This error doesn't happen in version 19.2.6.
Minimal Reproduction
Reproduction url: https://github.com/jordimarimon/angular-cli-js-decorator
The application has been created using the following command:
There are only two additional files:
src/app/app.service.ts
src/app/debounce.ts
Run the command
npx ng build --configuration=production
and there shouldn't be any error.Now run the command
npx ng build --configuration=development
and there should be an error.If you downgrade to version
19.2.6
both commands run without any error.Exception or Error
Your Environment
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: