angular-cn/packages/compiler-cli/test
Alex Rickabaugh ed1db40322 fix(ivy): use 'typeof' and 'never' for type metadata (#24862)
Previously ngtsc would use a tuple of class types for listing metadata
in .d.ts files. For example, an @NgModule's declarations might be
represented with the type:

[NgIf, NgForOf, NgClass]

If the module had no declarations, an empty tuple [] would be produced.

This has two problems.

1. If the class type has generic type parameters, TypeScript will
complain that they're not provided.

2. The empty tuple type is not actually legal.

This commit addresses both problems.

1. Class types are now represented using the `typeof` operator, so the
above declarations would be represented as:

[typeof NgIf, typeof NgForOf, typeof NgClass].

Since typeof operates on a value, it doesn't require generic type
arguments.

2. Instead of an empty tuple, `never` is used to indicate no metadata.

PR Close #24862
2018-07-20 11:48:36 -07:00
..
compliance refactor(ivy): run the compiler compliance tests against ngtsc (#24862) 2018-07-20 11:48:36 -07:00
diagnostics build: upgrade jasmine (and related typings) to latest version (#19904) 2018-07-06 13:48:02 -07:00
metadata fix(compiler-cli): Use typescript to resolve modules for metadata (#22856) 2018-07-10 11:11:48 -07:00
ngtsc fix(ivy): use 'typeof' and 'never' for type metadata (#24862) 2018-07-20 11:48:36 -07:00
transformers build: upgrade jasmine (and related typings) to latest version (#19904) 2018-07-06 13:48:02 -07:00
BUILD.bazel test: switch to ts_web_test_suite (#23859) 2018-05-15 11:40:56 -07:00
extract_i18n_spec.ts fix(compiler): i18n_extractor now outputs the correct source file name (#24885) 2018-07-16 16:09:01 -04:00
mocks.ts fix(compiler-cli): Use typescript to resolve modules for metadata (#22856) 2018-07-10 11:11:48 -07:00
ngc_spec.ts build: upgrade jasmine (and related typings) to latest version (#19904) 2018-07-06 13:48:02 -07:00
ngtools_api_spec.ts ci(compiler-cli): run compiler-cli tests in bazel (#22997) 2018-03-28 10:02:53 -07:00
perform_watch_spec.ts build: upgrade to TypeScript 2.6 (#21144) 2017-12-22 20:15:47 -08:00
test_support.ts ci(compiler-cli): run compiler-cli tests in bazel (#22997) 2018-03-28 10:02:53 -07:00