Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make visitor functions public
  • Loading branch information
rbuckton committed Feb 8, 2017
commit fc2cf2f78f71d4a38f39c721b6dc992f4636b163
7 changes: 7 additions & 0 deletions src/compiler/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3935,6 +3935,13 @@
*/
export type FileTransformer = (node: SourceFile) => SourceFile;

export type VisitResult<T extends Node> = T | T[];

/**
* A function that accepts and possible transforms a node.
*/
export type Visitor = (node: Node) => VisitResult<Node>;

export interface Printer {
/**
* Print a node and its subtree as-is, without any emit transformations.
Expand Down
Loading