UNPKG

@graphql-eslint/eslint-plugin

Version:
14 lines (13 loc) 959 B
import { Location, GraphQLOutputType, GraphQLNamedType, Token } from 'graphql'; import { Comment, SourceLocation } from 'estree'; import { AST } from 'eslint'; export declare const valueFromNode: (valueNode: import("graphql").ValueNode, variables?: import("graphql/jsutils/ObjMap").ObjMap<unknown>) => any; export declare function getBaseType(type: GraphQLOutputType): GraphQLNamedType; type TokenKindValue = '<SOF>' | '!' | '$' | '&' | '(' | ')' | '...' | ':' | '=' | '@' | '[' | ']' | '{' | '|' | '}' | 'Name' | 'Int' | 'Float' | 'String' | 'BlockString' | 'Comment'; export declare function convertToken<T extends 'Line' | 'Block' | TokenKindValue>(token: Token, type: T): Omit<AST.Token, 'type'> & { type: T; }; export declare function extractTokens(filePath: string, code: string): AST.Token[]; export declare function extractComments(loc: Location): Comment[]; export declare function convertLocation(location: Location): SourceLocation; export {};