fix(compiler-cli): avoid ECMAScript private field metadata emit#61227
fix(compiler-cli): avoid ECMAScript private field metadata emit#61227clydin wants to merge 1 commit intoangular:mainfrom
Conversation
packages/compiler-cli/src/ngtsc/annotations/common/test/metadata_spec.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
I now wonder if private fields are supported for Angular-decorated symbols at all. If they are, this change would mean that such fields would generally work except for being JIT-compatible, as that's where the metadata transform (especially for signal-based inputs) is relevant.
Since this change primarily targets non-Angular decorators this point it irrelevant to fix the reported issue so no further actions needed for now.
8a230f0 to
8040007
Compare
The Angular class metadata emit structure does not support the use of private fields. If the class metadata emit is enabled and an ECMAScript private (i.e., `#` prefixed) member contains a decorator, the member will now be excluded from the emitting `setClassMetadata` call. This prevents runtime errors due to invalid syntax.
8040007 to
59d6c99
Compare
|
This PR was merged into the repository by commit c0cd3c2. The changes were merged into the following branches: main, 19.2.x, 20.0.x |
The Angular class metadata emit structure does not support the use of private fields. If the class metadata emit is enabled and an ECMAScript private (i.e., `#` prefixed) member contains a decorator, the member will now be excluded from the emitting `setClassMetadata` call. This prevents runtime errors due to invalid syntax. PR Close #61227
The Angular class metadata emit structure does not support the use of private fields. If the class metadata emit is enabled and an ECMAScript private (i.e., `#` prefixed) member contains a decorator, the member will now be excluded from the emitting `setClassMetadata` call. This prevents runtime errors due to invalid syntax. PR Close #61227
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
The Angular class metadata emit structure does not support the use of private fields. If the class metadata emit is enabled and an ECMAScript private (i.e.,
#prefixed) member contains a decorator, the member will now be excluded from the emittingsetClassMetadatacall. This prevents runtime errors due to invalid syntax. This class member usage is only permitted if standard ECMAScript decorators are used.Closes #61228