typescript-transformer-handbook
typescript-transformer-handbook copied to clipboard
📘 A comprehensive handbook on how to create transformers for TypeScript with code examples
Hi again! I am wondering if it is possible to adjust the prototype of a class declaration? E.g. add specific properties? If anyone has an idea I would really appreciate...
Hey! Once again I would like first of all to say that I really appreciate this repository and the provided examples. E.g. the example regarding `Adding new import declarations`. Although...
Hello again! Sorry for using this channel again asking a general usage question. But I really appreciated your help the last time. How can I or how would you add...
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...
If you have ideas of how we can get this translated to as much languages as possible - please chime in!
Part of #2. Only example added for discussion. DONT MERGE now.
```ts.createImportClause(``` is deprecated ```ts.factory.createImportClause(``` is current version also for many other methods here
I need to transform ES6 syntax into ES5 but keep types. So I need TypeScript ES6 to TypeScript ES5 transformer (not JS). `ts.transpile()` strips all the types and essentially outputs...
[Example in the playground](https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAKjgQwM5xugZlCI4DkMAnmAKaoDGUwYMBA3AFBOUQB2q8MUynW0EGSgAuDKgB0AFV79BwgGLJKMaMQA8mCQGUIAVyiUyC4ABsyAPjgBeOG3YwyAD3jWrAbyZw4UMjAPscKj6hsZmZDYeXt52HFxwAG7AqMCqUDZwABTsEAAmZGJaAHJ5ZACUhZIl+ZFwnjExwFhZWskAkvkOTcDC2aVlZXXRDd6oAO6plAAWWTn5EhSUyOS5Us4wg-UjDUuoEQQARsgHZKYEIsPbMb7+UIH2ji4SWMppxBLUZMiOHWRdWD0oJkiKRFjQ6AQysxLttdvswKY9ABzYCcc4wq43AKxBzrZ6vNQfXzfMi-f6A4E8PioARQIRQVCQ5hXOAAXwx7IxWLu4gkSRSMAAosopgBhKZmXJ9fIAGkSyVS0DlD3WUMurOhDW5gS0-NS1TImWCBiMJnMcr1aTV3g1TFtTGckFgcHyLz0pm4shp8igDCAA) Unfortunately, most examples in this guide (and most of my code too 😆 ) is broken in TypeScript 5.0 because the `transformer` type now requires its...