You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(aot): setClassMetadata propDecorators includes static members and emits string-literal member keys unquoted #539
Follow-up from #522 — AOT propDecorators member-shape divergences found while comparing with metadata.ts.
Problem
OXC's AOT setClassMetadata propDecorators (crates/oxc_angular_compiler/src/class_metadata/builders.rs::build_prop_decorators_metadata_in) diverges from ngtsc's extractClassMetadata (packages/compiler-cli/src/ngtsc/annotations/common/src/metadata.ts:90-115) in three ways:
Static members are included. Upstream filters !member.isStatic (and accessLevel !== EcmaScriptPrivate); OXC does not check r#static, so a decorated static member leaks into propDecorators while ngtsc omits it.
String-literal member keys are not quoted. Upstream sets quoted: shouldQuoteName when nameNode is a string literal; OXC passes quoted: false to LiteralMapEntry::new unconditionally (~line 547), so a member named 'x-y' emits x-y: [...] — invalid JS / unparseable metadata. Same class of bug fixed for the JIT emit path in fix(compiler): lower all @angular/core member decorators into JIT propDecorators #537.
Duplicate decorated members (same name across getter/setter etc.) produce an upstream diagnostic; OXC silently emits both (last wins in JSON).
Expected
Skip r#static and ECMAScript-private members when building propDecorators.
Pass quoted: true to LiteralMapEntry::new for PropertyKey::StringLiteral keys.
Activity