angular / dgeni-packages

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

Support "import x as y" #192

Closed chalin closed 7 years ago

chalin commented 8 years ago

Line 17 of router-deprecated/src/lifecycle/lifecycle_annotations.ts is:

import {CanActivate as CanActivateAnnotation} ...

but when generating the API docs CanActivateAnnotation gets reported as an invalid:

Invalid link (does not match any doc): "RouteConfigAnnotation" - doc "@angular/router-deprecated/index/RouteConfig" (decorator)  - from file "/Users/chalin/git/angular/modules/@angular/router-deprecated/src/route_config/route_config_decorator.ts"

This can be confirmed from the corresponding API page: notice how the link to CanActivateAnnotation is invalid.

petebacondarwin commented 8 years ago

I believe that the actual problem here is that the type is not being exported publicly. The following PR removes the problem: https://github.com/angular/angular/pull/9909

chalin commented 8 years ago

I fixed a similar problem late yesterday (https://github.com/angular/angular/pull/9899), but it didn't occur to me that it might be a similar fix for this problem. Thanks for looking into it. I'm marking this as resolved.

chalin commented 8 years ago

Upon closer inspection, I don't believe that https://github.com/angular/angular/pull/9909 is a proper solution because CanActivateAnnotation is meant to remain private (it is only used as part of the initialization of the var).

petebacondarwin commented 8 years ago

In which case we should not be linking to it then. Part of the reworking of decorator docs that needs to be done...

chalin commented 8 years ago

https://github.com/angular/angular/pull/9912 is a simple refactoring workaround that can be used until the decorator doc processing is fixed.

petebacondarwin commented 7 years ago

Is this still a problem @chalin ?

chalin commented 7 years ago

No, thanks.