mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
[graphql] Predicates can be now used as type guards (#31701)
* feat(graphql): predicates as type guards Predicates in `graphql/language/predicates` are used in Flow as type guards. Now they can be used in TS too: * isDefinitionNode * isExecutableDefinitionNode * isSelectionNode * isValueNode * isTypeNode * isTypeSystemDefinitionNode * isTypeDefinitionNode * isTypeSystemExtensionNode * isTypeExtensionNode * chore(graphql): add langpavel to "Definitions by"
This commit is contained in:
committed by
Wesley Wigham
parent
b37d6a5b05
commit
09f738c6d5
Vendored
+1
@@ -16,6 +16,7 @@
|
||||
// Brad Zacher <https://github.com/bradzacher>
|
||||
// Curtis Layne <https://github.com/clayne11>
|
||||
// Jonathan Cardoso <https://github.com/JCMais>
|
||||
// Pavel Lang <https://github.com/langpavel>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.6
|
||||
|
||||
|
||||
+21
-10
@@ -1,19 +1,30 @@
|
||||
import { ASTNode } from "./ast";
|
||||
import {
|
||||
ASTNode,
|
||||
DefinitionNode,
|
||||
ExecutableDefinitionNode,
|
||||
SelectionNode,
|
||||
ValueNode,
|
||||
TypeNode,
|
||||
TypeSystemDefinitionNode,
|
||||
TypeDefinitionNode,
|
||||
TypeSystemExtensionNode,
|
||||
TypeExtensionNode,
|
||||
} from "./ast";
|
||||
|
||||
export function isDefinitionNode(node: ASTNode): boolean;
|
||||
export function isDefinitionNode(node: ASTNode): node is DefinitionNode;
|
||||
|
||||
export function isExecutableDefinitionNode(node: ASTNode): boolean;
|
||||
export function isExecutableDefinitionNode(node: ASTNode): node is ExecutableDefinitionNode;
|
||||
|
||||
export function isSelectionNode(node: ASTNode): boolean;
|
||||
export function isSelectionNode(node: ASTNode): node is SelectionNode;
|
||||
|
||||
export function isValueNode(node: ASTNode): boolean;
|
||||
export function isValueNode(node: ASTNode): node is ValueNode;
|
||||
|
||||
export function isTypeNode(node: ASTNode): boolean;
|
||||
export function isTypeNode(node: ASTNode): node is TypeNode;
|
||||
|
||||
export function isTypeSystemDefinitionNode(node: ASTNode): boolean;
|
||||
export function isTypeSystemDefinitionNode(node: ASTNode): node is TypeSystemDefinitionNode;
|
||||
|
||||
export function isTypeDefinitionNode(node: ASTNode): boolean;
|
||||
export function isTypeDefinitionNode(node: ASTNode): node is TypeDefinitionNode;
|
||||
|
||||
export function isTypeSystemExtensionNode(node: ASTNode): boolean;
|
||||
export function isTypeSystemExtensionNode(node: ASTNode): node is TypeSystemExtensionNode;
|
||||
|
||||
export function isTypeExtensionNode(node: ASTNode): boolean;
|
||||
export function isTypeExtensionNode(node: ASTNode): node is TypeExtensionNode;
|
||||
|
||||
Reference in New Issue
Block a user