- 
                Notifications
    
You must be signed in to change notification settings  - Fork 80
 
Closed
Description
I wrote a tool which patch ts on the fly and add support for custom transformers from tsconfig.json
https://github.com/cevek/ttypescript
{
    "compilerOptions": {
        "plugins": [
            {
                "customTransformers": {
                    "before": ["ts-transformer-keys"],
                }
            }
        ]
    }
}
but it works slightly different by calling your transformer directly and provide the program as second argument
This is transformer example:
import * as ts from 'typescript';
export default (ctx: ts.TransformationContext, program: ts.Program): ts.Transformer<ts.SourceFile> => {
    return sourceFile => {
        function visitor(node: ts.Node): ts.Node {
            return ts.visitEachChild(node, visitor, ctx);
        }
        return ts.visitEachChild(sourceFile, visitor, ctx);
    };
};If you accept PR, I can add support for this
Metadata
Metadata
Assignees
Labels
No labels