angular/packages
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
..
animations refactor(animations): handle #24571 todos (#49231) 2023-03-06 18:45:33 +00:00
bazel build: update all non-major dependencies (#49267) 2023-03-02 14:09:14 -08:00
benchpress build: ensure bootstrap transitive runfiles are made available (#48521) 2022-12-19 19:50:41 +00:00
common docs(common): mark lifecycle methods as nodoc (#49416) 2023-03-14 09:41:35 -07:00
compiler feat(compiler): add support for compile-time required inputs (#49304) 2023-03-15 16:59:24 -07:00
compiler-cli feat(compiler): add support for compile-time required inputs (#49304) 2023-03-15 16:59:24 -07:00
core feat(compiler): add support for compile-time required inputs (#49304) 2023-03-15 16:59:24 -07:00
docs docs: fix packages\docs\di\di.md (#46704) 2022-07-08 17:53:39 +00:00
elements build: remove core-js-bundle from dependencies (#49259) 2023-03-01 11:19:48 -08:00
examples fix(core): generate consistent component IDs (#48253) 2023-03-09 09:33:34 -08:00
forms refactor(core): Remove isObservable() in favor isSubscribable(). (#49295) 2023-03-08 17:58:19 +00:00
language-service refactor(compiler): required inputs prerequisite refactors (#49333) 2023-03-14 09:27:49 -07:00
localize refactor(core): remove Node.js v14 support (#49255) 2023-02-28 11:00:25 -08:00
misc/angular-in-memory-web-api build: update angular-in-memory-web-api to work with ESM (#48521) 2022-12-19 19:50:42 +00:00
platform-browser refactor(core): move Zone providers to a single provider function (#49373) 2023-03-14 09:20:53 -07:00
platform-browser-dynamic refactor(core): remove Node.js v14 support (#49255) 2023-02-28 11:00:25 -08:00
platform-server refactor(core): add hydration logic for view containers (#49382) 2023-03-14 14:22:09 -07:00
private/testing fix(platform-server): bundle @angular/domino in via esbuild (#49229) 2023-02-28 13:34:50 -08:00
router fix(router): Remove deprecated ComponentFactoryResolver from APIs (#49239) 2023-03-14 10:58:12 -07:00
service-worker feat(service-worker): add function to provide service worker (#48247) 2023-03-09 18:13:50 +00:00
upgrade docs(upgrade): mark lifecycle methods as nodoc (#49416) 2023-03-14 09:41:35 -07:00
zone.js fix(zone.js): revert Mocha it.skip, describe.skip method patch (#49329) 2023-03-14 09:13:57 -07:00
BUILD.bazel build(bazel): list docs entrypoints under packages to simplify docgen 2022-11-22 13:51:16 -07:00
circular-deps-test.conf.js build: ignore type only imports/exports for circular dependency checks (#47017) 2022-08-18 12:06:09 -07:00
empty.ts
goog.d.ts refactor(core): replace references to goog.LOCALE with goog.getLocale() (#43089) 2021-08-10 10:35:26 -07:00
license-banner.txt build: bump license year (#44590) 2022-01-04 12:05:25 -08:00
README.md
system.d.ts
tsconfig-build.json refactor: adjust packages/core/test to work with ESM (#48521) 2022-12-19 19:50:42 +00:00
tsconfig-legacy-saucelabs.json refactor(compiler): drop obsolete NgFactory and NgSummary config options (#48268) 2023-02-21 13:03:59 -08:00
tsconfig-test.json build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
tsconfig-tsec-base.json build: update tsconfigs to use ES2020 as target and module (#43431) 2021-10-01 18:28:42 +00:00
tsconfig.json refactor(compiler): drop obsolete NgFactory and NgSummary config options (#48268) 2023-02-21 13:03:59 -08:00
tsec-exemption.json fix(core): hardening attribute and property binding rules for <iframe> elements (#47964) 2022-11-09 00:47:56 -08:00
types.d.ts build: update to jasmine 4.0 (#45558) 2022-04-11 16:25:28 +00:00

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

Usage information and reference details can be found in Angular documentation.

License: MIT