UNPKG

981 BTypeScriptView Raw
1import { ASTNode } from 'graphql';
2export declare const asArray: <T>(fns: T | T[]) => T[];
3export declare function isDocumentString(str: any): boolean;
4/**
5 * Checkes whether the `str` contains any path illegal characters.
6 *
7 * A string may sometimes look like a path but is not (like an SDL of a simple
8 * GraphQL schema). To make sure we don't yield false-positives in such cases,
9 * we disallow new lines in paths (even though most Unix systems support new
10 * lines in file names).
11 */
12export declare function isValidPath(str: any): boolean;
13export declare function compareStrings<A, B>(a: A, b: B): 1 | -1 | 0;
14export declare function nodeToString(a: ASTNode): string;
15export declare function compareNodes(a: ASTNode, b: ASTNode, customFn?: (a: any, b: any) => number): number;
16export declare function isSome<T>(input: T): input is Exclude<T, null | undefined>;
17export declare function assertSome<T>(input: T, message?: string): asserts input is Exclude<T, null | undefined>;