angular/packages/compiler-cli
Kristiyan Kostadinov 1a6ca68154 feat(compiler): add support for compile-time required inputs (#49304)
Adds support for marking a directive input as required. During template type checking, the compiler will verify that all required inputs have been specified and will raise a diagnostic if one or more are missing. Some specifics:
* Inputs are marked as required by passing an object literal with a `required: true` property to the `Input` decorator or into the `inputs` array.
* Required inputs imply that the directive can't work without them. This is why there's a new check that enforces that all required inputs of a host directive are exposed on the host.
* Required input diagnostics are reported through the `OutOfBandDiagnosticRecorder`, rather than generating a new structure in the TCB, because it allows us to provide a better error message.
* Currently required inputs are only supported during AOT compilation, because knowing which bindings are present during JIT can be tricky and may lead to increased bundle sizes.

Fixes #37706.

PR Close #49304
2023-03-15 16:59:24 -07:00
..
integrationtest refactor(compiler): drop obsolete NgFactory and NgSummary config options (#48268) 2023-02-21 13:03:59 -08:00
linker feat(compiler): add support for compile-time required inputs (#49304) 2023-03-15 16:59:24 -07:00
private refactor(compiler-cli): remove unused class decorator downlevel code (#49351) 2023-03-08 17:59:12 +00:00
src feat(compiler): add support for compile-time required inputs (#49304) 2023-03-15 16:59:24 -07:00
test feat(compiler): add support for compile-time required inputs (#49304) 2023-03-15 16:59:24 -07:00
BUILD.bazel refactor: remove Angular Compatibility Compiler (ngcc) (#49101) 2023-02-16 16:01:17 -08:00
esbuild.config.js refactor: remove __ESM_IMPORT_META_URL__ workaround now that we can use ESM (#48521) 2022-12-19 19:50:41 +00:00
index.ts refactor(compiler-cli): Export the interface PluginCompilerHost for 1p use. (#48874) 2023-02-02 09:44:18 -08:00
package.json refactor(core): remove Node.js v14 support (#49255) 2023-02-28 11:00:25 -08:00
tsconfig-build.json refactor(compiler-cli): dismantle View Engine implementation of ngc (#44269) 2021-12-01 10:36:30 -08:00
tsconfig.json build: update tsconfigs to use ES2020 as target and module (#43431) 2021-10-01 18:28:42 +00:00