UNPKG

@graphql-eslint/eslint-plugin

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