Skip to content

Commit fc2cf2f

Browse files
committed
Make visitor functions public
1 parent db23ca7 commit fc2cf2f

File tree

2 files changed

+810
-803
lines changed

2 files changed

+810
-803
lines changed

src/compiler/types.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3935,6 +3935,13 @@
39353935
*/
39363936
export type FileTransformer = (node: SourceFile) => SourceFile;
39373937

3938+
export type VisitResult<T extends Node> = T | T[];
3939+
3940+
/**
3941+
* A function that accepts and possible transforms a node.
3942+
*/
3943+
export type Visitor = (node: Node) => VisitResult<Node>;
3944+
39383945
export interface Printer {
39393946
/**
39403947
* Print a node and its subtree as-is, without any emit transformations.

0 commit comments

Comments
 (0)