angular/packages/compiler-cli/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
..
compliance feat(compiler): add support for compile-time required inputs (#49304) 2023-03-15 16:59:24 -07:00
ngtsc feat(compiler): add support for compile-time required inputs (#49304) 2023-03-15 16:59:24 -07:00
BUILD.bazel build: ensure bootstrap transitive runfiles are made available (#48521) 2022-12-19 19:50:41 +00:00
downlevel_decorators_transform_spec.ts refactor(compiler-cli): remove unused class decorator downlevel code (#49351) 2023-03-08 17:59:12 +00:00
extract_i18n_spec.ts build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
mocks.ts refactor: make all imports compatible with ESM/CJS output. (#43431) 2021-10-01 18:28:45 +00:00
perform_compile_spec.ts test(compiler): add test case for merging objects in tsconfig (#49125) 2023-03-06 16:57:28 +00:00
perform_watch_spec.ts perf(compiler-cli): minimize filesystem calls when generating shims (#47682) 2022-10-07 09:10:34 -07:00
test_support.ts feat(core): add support for TypeScript 5.0 (#49126) 2023-02-28 08:24:47 -08:00
typescript_support_spec.ts fix(compiler-cli): handle pre-release versions when checking version (#44109) 2021-11-09 20:54:45 +00:00
version_helpers_spec.ts refactor(compiler-cli): move version number helpers out of diagnostics subfolder (#44269) 2021-12-01 10:36:30 -08:00