angular/packages/compiler/test
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
..
expression_parser build: ensure bootstrap transitive runfiles are made available (#48521) 2022-12-19 19:50:41 +00:00
i18n test: remove view-engine-only tests (#43884) 2021-11-23 21:10:06 +00:00
ml_parser feat(compiler): allow self-closing tags on custom elements (#48535) 2023-01-04 12:07:37 -08:00
output test: update source-map tests to account for source-map breaking change (#46888) 2022-07-19 09:40:54 -07:00
render3 build: ensure bootstrap transitive runfiles are made available (#48521) 2022-12-19 19:50:41 +00:00
schema fix(compiler): update element schema (#47552) 2022-10-11 17:21:47 +00:00
selector feat(compiler): allow self-closing tags on custom elements (#48535) 2023-01-04 12:07:37 -08:00
shadow_css fix(compiler): handle css selectors with space after an escaped character. (#48558) 2023-01-24 17:46:33 +00:00
BUILD.bazel build: refactor packages/compiler/test to work with ESM (#48521) 2022-12-19 19:50:42 +00:00
compiler_facade_interface_spec.ts feat(compiler): add support for compile-time required inputs (#49304) 2023-03-15 16:59:24 -07:00
integration_spec.ts build: update to jasmine 4.0 (#45558) 2022-04-11 16:25:28 +00:00
security_spec.ts fix(core): hardening attribute and property binding rules for <iframe> elements (#47964) 2022-11-09 00:47:56 -08:00
style_url_resolver_spec.ts refactor(compiler): make template preparser null-safe (#44411) 2022-01-04 15:54:10 -08:00
util_spec.ts perf(compiler): use raw bytes to represent utf-8 encoded strings (#39694) 2020-11-17 10:09:28 -08:00