angular-cn/packages/core
JoostK 8d15bfa6ee fix(ivy): allow abstract directives to have an invalid constructor (#32987)
For abstract directives, i.e. directives without a selector, it may
happen that their constructor is called explicitly from a subclass,
hence its parameters are not required to be valid for Angular's DI
purposes. Prior to this commit however, having an abstract directive
with a constructor that has parameters that are not eligible for
Angular's DI would produce a compilation error.

A similar scenario may occur for `@Injectable`s, where an explicit
`use*` definition allows for the constructor to be irrelevant. For
example, the situation where `useFactory` is specified allows for the
constructor to be called explicitly with any value, so its constructor
parameters are not required to be valid. For `@Injectable`s this is
handled by generating a DI factory function that throws.

This commit implements the same solution for abstract directives, such
that a compilation error is avoided while still producing an error at
runtime if the type is instantiated implicitly by Angular's DI
mechanism.

Fixes #32981

PR Close #32987
2019-10-25 12:13:23 -07:00
..
schematics refactor(core): add links to remaining migration guides (#33385) 2019-10-24 16:21:49 -07:00
src fix(ivy): allow abstract directives to have an invalid constructor (#32987) 2019-10-25 12:13:23 -07:00
test test(ivy): support `className` in micro benchmarks (#33392) 2019-10-25 09:17:52 -07:00
testing feat: typescript 3.6 support (#32946) 2019-10-18 13:15:16 -04:00
BUILD.bazel refactor(ivy): remove `i18nLocalize` instruction (#31609) 2019-08-30 12:53:26 -07:00
PACKAGE.md docs: add package doc files (#26047) 2018-10-05 15:42:14 -07:00
index.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
package.json feat: typescript 3.6 support (#32946) 2019-10-18 13:15:16 -04:00
public_api.ts build: publish tree of files rather than FESMs (#18541) 2017-08-31 15:34:50 -07:00