angular-cn/packages/compiler-cli/test/ngtsc
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
..
fake_core fix(ivy): throw better error for missing generic type in ModuleWithProviders (#33187) 2019-10-18 14:49:54 -04:00
BUILD.bazel build: remove redundant `@types/source-map` dependency (#31468) 2019-07-11 17:18:12 -04:00
component_indexing_spec.ts feat(ivy): index template references, variables, bound attributes/events (#31535) 2019-07-25 13:09:10 -07:00
env.ts fix(ivy): capture template source mapping details during preanalysis (#32544) 2019-09-09 19:10:34 -04:00
incremental_spec.ts fix(ivy): reuse compilation scope for incremental template changes. (#31932) 2019-08-09 10:50:40 -07:00
ngtsc_spec.ts fix(ivy): allow abstract directives to have an invalid constructor (#32987) 2019-10-25 12:13:23 -07:00
scope_spec.ts refactor(core): rename ngModuleDef to ɵmod (#33142) 2019-10-14 23:08:10 +00:00
sourcemap_utils.ts refactor(ivy): implement a virtual file-system layer in ngtsc + ngcc (#30921) 2019-06-25 16:25:24 -07:00
template_mapping_spec.ts perf(ivy): move attributes array into component def (#32798) 2019-10-09 13:16:55 -07:00
template_typecheck_spec.ts feat(ivy): strictness flags for template type checking (#33365) 2019-10-24 16:16:14 -07:00