Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(compiler-cli): attach the correct viaModule to namespace imports #33495

Closed

Commits on Oct 30, 2019

  1. fix(compiler-cli): attach the correct viaModule to namespace imports

    Previously declarations that were imported via a namespace import
    were given the same `bestGuessOwningModule` as the context
    where they were imported to. This causes problems with resolving
    `ModuleWithProviders` that have a type that has been imported in
    this way, causing errors like:
    
    ```
    ERROR in Symbol UIRouterModule declared in
    .../@uirouter/angular/uiRouterNgModule.d.ts
    is not exported from
    .../@uirouter/angular/uirouter-angular.d.ts
    (import into .../src/app/child.module.ts)
    ```
    
    This commit modifies the `TypescriptReflectionHost.getDirectImportOfIdentifier()`
    method so that it also understands how to attach the correct `viaModule` to
    the identifier of the namespace import.
    
    Resolves angular#32166
    petebacondarwin committed Oct 30, 2019
    Copy the full SHA
    d38e953 View commit details
    Browse the repository at this point in the history