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(dts): ngAcceptInputType_* types drop some comments ngtsc keeps #506
#496 prints the transform's parameter type into .d.ts. It keeps a single-line block comment in front of a list element. ngtsc keeps more than that, and in some U+2028/U+2029 cases prints the comment twice. Only the comments in the .d.ts text differ. The type is the same.
Repro (each line is the parameter type of @Input({transform: (v: <TYPE>) => 1}) a)
Cases where they already match: Array</* c */ string>, string /* keep */ \| number, /* a\n b */ string (both drop it), string /* a\n b */ (both drop it), and { a: 1; // x b: ... }.
crates/oxc_angular_compiler/src/directive/dts_type.rs (added in #496): leading_comments / same_line_comments. Only the comments on the same line in front of a list element are kept. Trailing comments, comments on their own line and comments that span lines are dropped.
On main?
No. Main prints unknown for these fields. This gap comes with #496.
Direction
Copy the rules of TypeScript's emitter for leading and trailing comments on type nodes, including the U+2028/U+2029 line-break cases. Test against ngtsc output.
Activity
fix(dts): keep the comments ngtsc keeps on `ngAcceptInputType_*` types (
fix(directive): evaluate `host` metadata statically like ngtsc (#569)
fix(parser): report incomplete control-flow blocks like Angular (#568)