diff --git a/tstypes/type/scalars.d.ts b/tstypes/type/scalars.d.ts index fe16fd5cad..ae2929c9ce 100644 --- a/tstypes/type/scalars.d.ts +++ b/tstypes/type/scalars.d.ts @@ -1,11 +1,18 @@ import { GraphQLScalarType } from './definition'; -export const GraphQLInt: GraphQLScalarType; -export const GraphQLFloat: GraphQLScalarType; -export const GraphQLString: GraphQLScalarType; -export const GraphQLBoolean: GraphQLScalarType; -export const GraphQLID: GraphQLScalarType; +export const GraphQLInt: GraphQLScalarType & { name: 'Int' }; +export const GraphQLFloat: GraphQLScalarType & { name: 'Float' }; +export const GraphQLString: GraphQLScalarType & { name: 'String' }; +export const GraphQLBoolean: GraphQLScalarType & { name: 'Boolean' }; +export const GraphQLID: GraphQLScalarType & { name: 'ID' }; + +export type SpecifiedScalarType = + | typeof GraphQLInt + | typeof GraphQLFloat + | typeof GraphQLString + | typeof GraphQLBoolean + | typeof GraphQLID; export const specifiedScalarTypes: ReadonlyArray; -export function isSpecifiedScalarType(type: any): type is GraphQLScalarType; +export function isSpecifiedScalarType(type: any): type is SpecifiedScalarType;