Skip to content

QUESTION : resolve imports #48

Closed
Closed
@vogloblinsky

Description

Hi,

First, let' say 👍 about this library, very wonderful work !!

I am the maintainer of compodoc, a documentation tool for Angular applications. https://github.com/compodoc/compodoc

I need for some use-case to support dynamic imports of different things.

// module-a.ts
export const VERSION = 5;
// module-b.ts
import { VERSION } from './module-a';
let toto = VERSION;
console.log(toto);

Would be nice if during AST parsing with TypeScript, if i could edit the AST node of toto variable to inject VERSION instead of just having a reference.

Did you know how can i achieve this with your lib or just with TypeScript compiler APIs ?
This blog http://blog.scottlogic.com/2017/05/02/typescript-compiler-api-revisited.html, chapter "TRANSFORMING THE AST" helps a little

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions