@graphql-eslint/eslint-plugin 3.8.0-alpha-8ddf2a4.0 → 3.8.0-alpha-269d044.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/estree-parser/utils.d.ts +4 -2
- package/package.json +1 -1
package/estree-parser/utils.d.ts
CHANGED
@@ -1,11 +1,12 @@
|
|
1
|
-
import { Location, ValueNode, StringValueNode, ASTNode,
|
1
|
+
import { Location, ValueNode, StringValueNode, ASTNode, GraphQLOutputType, GraphQLNamedType, Token, Source } from 'graphql';
|
2
2
|
import type { Comment } from 'estree';
|
3
3
|
import type { AST } from 'eslint';
|
4
4
|
import type { GraphQLESTreeNode } from './estree-ast';
|
5
5
|
export default function keyValMap<T, V>(list: ReadonlyArray<T>, keyFn: (item: T) => string, valFn: (item: T) => V): Record<string, V>;
|
6
6
|
export declare function valueFromNode(valueNode: GraphQLESTreeNode<ValueNode>, variables?: Record<string, any>): any;
|
7
7
|
export declare function getBaseType(type: GraphQLOutputType): GraphQLNamedType;
|
8
|
-
|
8
|
+
declare type TokenKindValue = '<SOF>' | '!' | '$' | '&' | '(' | ')' | '...' | ':' | '=' | '@' | '[' | ']' | '{' | '|' | '}' | 'Name' | 'Int' | 'Float' | 'String' | 'BlockString' | 'Comment';
|
9
|
+
export declare function convertToken<T extends 'Line' | 'Block' | TokenKindValue>(token: Token, type: T): Omit<AST.Token, 'type'> & {
|
9
10
|
type: T;
|
10
11
|
};
|
11
12
|
export declare function extractTokens(source: Source): AST.Token[];
|
@@ -14,3 +15,4 @@ export declare function isNodeWithDescription<T extends ASTNode>(obj: T): obj is
|
|
14
15
|
readonly description?: StringValueNode;
|
15
16
|
};
|
16
17
|
export declare function convertDescription<T extends ASTNode>(node: T): Comment[];
|
18
|
+
export {};
|