Skip to content

Dragoteryx/ts-transform-visitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TS Transform Visitor

A TypeScript utility function to easily create transformers using the visitor pattern.

How to use

import transform from "ts-transform-visitor";
import ts from "typescript";

export default transform("program", function(node) {
  if (ts.isDecorator(node)) return null;
});

The visit function can return either a node, an array of nodes or null to remove the current node. Returning nothing or undefined visits the children nodes.

About

A TypeScript utility function to easily create transformers using the visitor pattern.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published