mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Whenever a signal input is captured in a type check block, we will insert an import. This will change the import graph so that the full TypeScript program cannot be structurally re-used. We can fix this trivially by ensuring the import graph remains stable, by always generating an import to e.g. `@angular/core`. This fixes the issue nicely for type-check block files. A test verifies this. For inline code, such as TCB inline or the type constructors inline, this fix is not applicable because we would change user-input source files, adding new edges that would not exist for subsequent builds- causing the program to be not re-used completely. One idea was to rely on the existing edge that can be assumed to exist for directive code files. This is true technically, but in practice TS does not deduplicate imports- so our new namespace import when referencing our symbols will invalidate the re-use. We will address this in a follow-up. There are a couple of options, such as working with the TS team, updating the existing edge, or inlining our helpers as well. PR Close #53521 |
||
|---|---|---|
| .. | ||
| integrationtest | ||
| linker | ||
| ngcc | ||
| private | ||
| src | ||
| test | ||
| BUILD.bazel | ||
| esbuild.config.js | ||
| index.ts | ||
| package.json | ||
| tsconfig-build.json | ||
| tsconfig.json | ||