@graphql-eslint/eslint-plugin
Version:
GraphQL plugin for ESLint
16 lines (13 loc) • 861 B
text/typescript
import { AST } from 'eslint';
import { Comment, SourceLocation } from 'estree';
import { GraphQLOutputType, GraphQLNamedType, TokenKind, Token, Location } from 'graphql';
import { valueFromASTUntyped } from 'graphql/utilities/valueFromASTUntyped.js';
declare const valueFromNode: (...args: Parameters<typeof valueFromASTUntyped>) => any;
declare function getBaseType(type: GraphQLOutputType): GraphQLNamedType;
declare function convertToken<T extends TokenKind | '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 };