refactor(compiler-cli): allow program strategies to opt out of inlining (#38105)
The template type-checking engine relies on the abstraction interface `TypeCheckingProgramStrategy` to create updated `ts.Program`s for template type-checking. The basic API is that the type-checking engine requests changes to certain files in the program, and the strategy provides an updated `ts.Program`. Typically, such changes are made to 'ngtypecheck' shim files, but certain conditions can cause template type-checking to require "inline" operations, which change user .ts files instead. The strategy used by 'ngc' (the `ReusedProgramStrategy`) supports these kinds of updates, but other clients such as the language service might not always support modifying user files. To accommodate this, the `TypeCheckingProgramStrategy` interface was modified to include a `supportsInlineOperations` flag. If an implementation specifies `false` for inline support, the template type-checking system will return diagnostics on components which would otherwise require inline operations. Closes #38059 PR Close #38105
This commit is contained in:

committed by
Misko Hevery

parent
16c7441c2f
commit
c573d91285
@ -32,5 +32,7 @@ export declare enum ErrorCode {
|
||||
MISSING_PIPE = 8004,
|
||||
WRITE_TO_READ_ONLY_VARIABLE = 8005,
|
||||
DUPLICATE_VARIABLE_DECLARATION = 8006,
|
||||
INLINE_TCB_REQUIRED = 8900,
|
||||
INLINE_TYPE_CTOR_REQUIRED = 8901,
|
||||
INJECTABLE_DUPLICATE_PROV = 9001
|
||||
}
|
||||
|
Reference in New Issue
Block a user