UNPKG

423 BTypeScriptView Raw
1import { GraphQLScalarType } from 'graphql';
2export type RegularExpressionErrorMessageFn = (r: RegExp, v: any) => string;
3export interface RegularExpressionOptions {
4 errorMessage?: RegularExpressionErrorMessageFn;
5 description?: string;
6 stringOnly?: boolean;
7}
8export declare class RegularExpression extends GraphQLScalarType {
9 constructor(name: string, regex: RegExp, options?: RegularExpressionOptions);
10}