|
1 | 1 | import { GraphQLScalarType } from 'graphql'; |
2 | 2 |
|
| 3 | +interface RegularExpressionOptions { |
| 4 | + errorMessage: Function; |
| 5 | +} |
| 6 | + |
3 | 7 | declare namespace GraphqlScalars { |
4 | | - declare const EmailAddress: GraphQLScalarType; |
5 | | - declare const DateTime: GraphQLScalarType; |
6 | | - declare const NonPositiveInt: GraphQLScalarType; |
7 | | - declare const PositiveInt: GraphQLScalarType; |
8 | | - declare const NonNegativeInt: GraphQLScalarType; |
9 | | - declare const NegativeInt: GraphQLScalarType; |
10 | | - declare const NonPositiveFloat: GraphQLScalarType; |
11 | | - declare const PositiveFloat: GraphQLScalarType; |
12 | | - declare const NonNegativeFloat: GraphQLScalarType; |
13 | | - declare const NegativeFloat: GraphQLScalarType; |
14 | | - declare const EmailAddress: GraphQLScalarType; |
15 | | - declare const URL: GraphQLScalarType; |
16 | | - declare const PhoneNumber: GraphQLScalarType; |
17 | | - declare const PostalCode: GraphQLScalarType; |
| 8 | + const EmailAddress: GraphQLScalarType; |
| 9 | + const DateTime: GraphQLScalarType; |
| 10 | + const NonPositiveInt: GraphQLScalarType; |
| 11 | + const PositiveInt: GraphQLScalarType; |
| 12 | + const NonNegativeInt: GraphQLScalarType; |
| 13 | + const NegativeInt: GraphQLScalarType; |
| 14 | + const NonPositiveFloat: GraphQLScalarType; |
| 15 | + const PositiveFloat: GraphQLScalarType; |
| 16 | + const NonNegativeFloat: GraphQLScalarType; |
| 17 | + const NegativeFloat: GraphQLScalarType; |
| 18 | + const URL: GraphQLScalarType; |
| 19 | + const PhoneNumber: GraphQLScalarType; |
| 20 | + const PostalCode: GraphQLScalarType; |
18 | 21 |
|
19 | | - declare class RegularExpression extends GraphQLScalarType { |
20 | | - constructor(name: string, regex: RegExp); |
| 22 | + class RegularExpression extends GraphQLScalarType { |
| 23 | + constructor( |
| 24 | + name: string, |
| 25 | + regex: RegExp, |
| 26 | + options?: RegularExpressionOptions, |
| 27 | + ); |
21 | 28 | } |
| 29 | + |
| 30 | + const DateTimeScalar: string; |
| 31 | + const NonPositiveIntScalar: string; |
| 32 | + const PositiveIntScalar: string; |
| 33 | + const NonNegativeIntScalar: string; |
| 34 | + const UnsignedIntScalar: string; |
| 35 | + const NegativeIntScalar: string; |
| 36 | + const NonPositiveFloatScalar: string; |
| 37 | + const PositiveFloatScalar: string; |
| 38 | + const NonNegativeFloatScalar: string; |
| 39 | + const UnsignedFloatScalar: string; |
| 40 | + const NegativeFloatScalar: string; |
| 41 | + const EmailAddressScalar: string; |
| 42 | + const URLScalar: string; |
| 43 | + const PhoneNumberScalar: string; |
| 44 | + const PostalCodeScalar: string; |
| 45 | + const RegularExpressionScalar: string; |
| 46 | + const OKGScalarDefinitions: string[]; |
22 | 47 | } |
23 | 48 |
|
24 | 49 | export = GraphqlScalars; |
0 commit comments