mirror of
https://github.com/angular/angular.git
synced 2026-11-22 22:55:25 -05:00
`getInputsTypeExpression` in `@angular/compiler` emits `'alias'`, `'required'`, and `'isSignal'` as quoted string-literal property signatures in the `InputMap` type argument of `ɵɵDirectiveDeclaration` and `ɵɵComponentDeclaration` on `ɵdir` and `ɵcmp`. However, `ɵɵDirectiveDeclaration` and `ɵɵComponentDeclaration` in `@angular/core` declared those constraint keys as unquoted identifier property signatures (`{alias: string | null; required: boolean; isSignal?: boolean}`).
In standard TypeScript, quoted and unquoted property signatures are structurally identical. When a property-renaming safety pass rewrites unquoted identifier property signatures in `.d.ts` type literals while preserving quoted string-literal keys, the renamed constraint keys on `InputMap` no longer match the quoted `'alias'`, `'required'`, and `'isSignal'` keys emitted on preprocessed `ɵdir` and `ɵcmp` source declarations, failing `TS2344`.
Quote `'alias'`, `'required'`, and `'isSignal'` in the `InputMap` constraint on `ɵɵDirectiveDeclaration` and `ɵɵComponentDeclaration` so the declaration constraints match the quoted keys emitted by `@angular/compiler`.
(cherry picked from commit 9399d67252)