mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
The compiler has a translation mechanism to convert from an Angular `Type` to a `ts.TypeNode`, as appropriate. Prior to this change, it would translate certain Angular expressions into their value equivalent in TypeScript, instead of the correct type equivalent. This was possible as the `ExpressionVisitor` interface is not strictly typed, with `any`s being used for return values. For example, a literal object was translated into a `ts.ObjectLiteralExpression`, containing `ts.PropertyAssignment` nodes as its entries. This has worked without issues as their printed representation is identical, however it was incorrect from a semantic point of view. Instead, a `ts.TypeLiteralNode` is created with `ts.PropertySignature` as its members, which corresponds with the type declaration of an object literal. PR Close #34021 |
||
|---|---|---|
| .. | ||
| integrationtest | ||
| ngcc | ||
| src | ||
| test | ||
| BUILD.bazel | ||
| index.ts | ||
| package.json | ||
| tsconfig-build.json | ||
| tsconfig.json | ||