Merge pull request #19535 from APIs-guru/getVisitFn

[GraphQL] Add "getVisitFn" function
This commit is contained in:
Arthur Ozga
2017-09-14 14:22:59 -07:00
committed by GitHub
2 changed files with 13 additions and 1 deletions

View File

@@ -6,4 +6,10 @@ export { createLexer, TokenKind, Lexer } from './lexer';
export { parse, parseValue, parseType, ParseOptions } from './parser';
export { print } from './printer';
export { Source } from './source';
export { visit, visitInParallel, visitWithTypeInfo, BREAK } from './visitor';
export {
visit,
visitInParallel,
visitWithTypeInfo,
getVisitFn,
BREAK
} from './visitor';

View File

@@ -47,3 +47,9 @@ export function visit(root: any, visitor: any, keyMap?: any): any;
export function visitInParallel(visitors: any): any;
export function visitWithTypeInfo(typeInfo: any, visitor: any): any;
/**
* Given a visitor instance, if it is leaving or not, and a node kind, return
* the function the visitor runtime should call.
*/
export function getVisitFn(visitor: any, kind: any, isLeaving: any): any;