itsdouges/typescript-transformer-handbook

Question ts-creator

LukasMachetanz opened this issue · 3 comments

You are mentioning the following tipp:

Tip - Use ts-creator to quickly get factory functions for a piece of TypeScript source - instead of meticulously writing out an AST for a node you can write a code string and have it converted to AST for you.

Could you provide an example for e.g. inserting a node with ts-creator.

Hey I haven't actually used that tbh - it was suggested by a friend.

Would you be interested in trying it out and then contributing back the information?

Maybe you could ask this friend if he has actually tried it? :)

If I need it in my project I will definitely come back to you. Currently I just copied the "native" calls suggested by the TypeScript AST Viewer. :)

@marionebl any thoughts?