angular / dgeni-packages

A collection of dgeni packages for generating documentation from source code.
MIT License
142 stars 101 forks source link

fix(typescript): correctly extract the type definition from type aliases #208

Closed petebacondarwin closed 7 years ago

petebacondarwin commented 7 years ago

When aliasing a class one must create two declarations for a symbol:

class OriginalClass {}
const AliasedClass = OriginalClass;
type AliasedClass = OriginalClass;

Previously we were looking for the type on the value definition (i.e. the const), and not finding it. Now if the type is not found on the value definition then we search the other declarations for the first to have a type property.

Related to https://github.com/angular/angular/pull/14523