[GraphQL] Add "getVisitFn" function

This commit is contained in:
Ivan Goncharov
2017-09-03 23:38:00 +03:00
parent 38894f063d
commit 35d44c172b
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;