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): properly emit literal types when recreating type parameters in a different file #42761

Closed

Commits on Jul 10, 2021

  1. fix(compiler-cli): properly emit literal types when recreating type p…

    …arameters in a different file
    
    In angular#42492 the template type checker became capable of replicating a
    wider range of generic type parameters for use in template type-check
    files. Any literal types within a type parameter would however emit
    invalid code, as TypeScript was emitting the literals using the text as
    extracted from the template type-check file instead of the original
    source file where the type node was taken from.
    
    This commit works around the issue by cloning any literal types and
    marking them as synthetic, signalling to TypeScript that the literal
    text has to be extracted from the node itself instead from the source
    file.
    
    This commit also excludes `import()` type nodes from being supported,
    as their module specifier may potentially need to be rewritten.
    
    Fixes angular#42667
    JoostK committed Jul 10, 2021
    Configuration menu
    Copy the full SHA
    02fea47 View commit details
    Browse the repository at this point in the history