You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
project.emit({customTransformers: {// optional transformers to evaluate before built in .js transformationsbefore: [context=>sourceFile=>visitSourceFile(sourceFile,context,numericLiteralToStringLiteral)],// optional transformers to evaluate after built in .js transformationsafter: [],// optional transformers to evaluate after built in .d.ts transformationsafterDeclarations: []}});functionvisitSourceFile(sourceFile: ts.SourceFile,context: ts.TransformationContext,visitNode: (node: ts.Node)=>ts.Node){returnvisitNodeAndChildren(sourceFile)asts.SourceFile;functionvisitNodeAndChildren(node: ts.Node): ts.Node{returnts.visitEachChild(visitNode(node),visitNodeAndChildren,context);}}functionnumericLiteralToStringLiteral(node: ts.Node){if(ts.isNumericLiteral(node))returnts.createStringLiteral(node.text);returnnode;}
The text was updated successfully, but these errors were encountered:
Would be nice to do this:
The text was updated successfully, but these errors were encountered: