angular/packages/platform-browser/src
Paul Gschwendtner 10a1e1974b fix(platform-browser): debug element query predicates not compatible with strictFunctionTypes (#30993)
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
2019-07-18 14:21:26 -07:00
..
browser refactor(platform-browser): compatibility with typescript strict flag (#30993) 2019-07-18 14:21:26 -07:00
dom fix(platform-browser): debug element query predicates not compatible with strictFunctionTypes (#30993) 2019-07-18 14:21:26 -07:00
security refactor: move DOCUMENT imports from platform-browser to common (#29237) 2019-03-14 16:01:57 -04:00
browser.ts fix(platform-browser): insert APP_ID in styles, contentAttr and hostAttr (#17745) 2019-04-11 07:59:22 -07:00
platform-browser.externs.js fix: create proper externs so that closure does not clobber e.g. ng for internal variables (#19423) 2017-09-26 15:02:33 -07:00
platform-browser.ts fix(ivy): remove debug utilities from ivy production builds (#30130) 2019-04-26 11:04:47 -07:00
private_export.ts feat: typescript 2.9 support (#24652) 2018-07-03 13:32:06 -07:00
version.ts docs: update platform-browser with @publicApi tags (#26595) 2018-10-19 14:35:52 -07:00