10a1e1974b
Currently developers can use the `By` class to construct common `DebugElement` query predicates. e.g. `By.directive(MyDirective)`. The `directive()` and `all()` predicates are currently returning a predicate that works for `DebugElement` nodes. This return type is too strict since the predicate is not specific to `DebugElement` instances and can also apply to `DebugNode` instances. Meaning that developers are currently able to use the `directive()` predicate when using `queryAllNodes()`. This is a common practice but will break when the project is compiled with TypeScript's `--strictFunctionTypes` flag as the `DebugElement` predicate type is not assignable to predicates for `DebugNode`. In order to make these predicates usable with `--strictFuntionTypes` enabled, we adjust the predicate type to reflect what is actually needed for evaluation of the predicate. PR Close #30993 |
||
---|---|---|
.. | ||
animations | ||
bazel | ||
benchpress | ||
common | ||
compiler | ||
compiler-cli | ||
core | ||
docs | ||
elements | ||
examples | ||
forms | ||
http | ||
language-service | ||
platform-browser | ||
platform-browser-dynamic | ||
platform-server | ||
platform-webworker | ||
platform-webworker-dynamic | ||
private/testing | ||
router | ||
service-worker | ||
upgrade | ||
zone.js | ||
BUILD.bazel | ||
README.md | ||
empty.ts | ||
goog.d.ts | ||
license-banner.txt | ||
system.d.ts | ||
tsconfig-build-no-strict.json | ||
tsconfig-build.json | ||
tsconfig-test.json | ||
tsconfig.json | ||
types.d.ts |
README.md
Angular
The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.
License: MIT