angular-cn/packages/compiler-cli/src
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
..
diagnostics build(bazel): Turning on strictPropertyInitialization for Angular. (#24572) 2018-06-25 07:57:13 -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 fix(ivy): use 'typeof' and 'never' for type metadata (#24862) 2018-07-20 11:48:36 -07:00
extract_i18n.ts refactor(compiler): remove all source-level traces to tsc-wrapped (#18966) 2017-09-13 20:47:37 -04:00
language_services.ts refactor(compiler): remove old ngtools api and add listLazyRoutes to new api (#19836) 2017-10-23 18:46:04 -04:00
main.ts build(ivy): support alternate compilation modes to enable Ivy testing (#24056) 2018-05-29 18:02:29 -04:00
ngtools_api.ts build: upgrade jasmine (and related typings) to latest version (#19904) 2018-07-06 13:48:02 -07:00
ngtools_api2.ts refactor(compiler): Drop support for the deprecated `<template>`. Use `<ng-template>` instead (#22783) 2018-03-15 14:52:22 -07:00
perform_compile.ts fix(compiler): don't typecheck all inputs (#22899) 2018-03-21 18:29:18 -04:00
perform_watch.ts build: upgrade to TypeScript 2.6 (#21144) 2017-12-22 20:15:47 -08:00
version.ts style: remove empty comments (#23404) 2018-05-10 15:48:13 -07:00