Reworked some of the code so asserts are no longer necessary.
Added additional and potentially redundant checks
Added checks where the null checker found real problems.
PR Close#16422
Language service was treating some alias TypeScript symbols as if
they where the canonical symbol. If the symbol in scope is an alias
of another symbol the symbol should be converted to the canonical
symbol.
Allows to inherit ctor args, lifecycle hooks and statics from a class
in another compilation unit.
Will error if trying to inherit from a class in another compilation unit
that has an `@Component` / `@Directive` / `@Pipe` / `@NgModule`.
Fixes#15528
What is the current behavior?
The language service access TypeScript's Symbol.members without checking for null or undefined.
What is the new behavior?
The access is guarded.
In v2.x, users had to annotate classes that they intended to use as tokens with `@Injectable`. This is no longer required in v4.x for tokens,
and we now require the constructor parameters of classes annotated
with `@Injectable` to be statically analyzable by ngc.
This commit reduces the error into a warning
if the constructor parameters do not meet this condition.
DEPRECATION:
- Classes annotated with `@Injectable` but whose constructor’s parameter types
are not statically analyzable by ngc will produce a warning.
Closes#15003