Skip to content

Commit

Permalink
Correct isSpecifiedScalarType refinement, fix graphql#2153
Browse files Browse the repository at this point in the history
  • Loading branch information
tgriesser committed Sep 23, 2019
1 parent ed0dfe8 commit 8f87a9f
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions tstypes/type/scalars.d.ts
@@ -1,11 +1,18 @@
import { GraphQLScalarType } from './definition';
import { GraphQLScalarType, isScalarType } 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<GraphQLScalarType>;

export function isSpecifiedScalarType(type: any): type is GraphQLScalarType;
export function isSpecifiedScalarType(type: any): type is SpecifiedScalarType;

0 comments on commit 8f87a9f

Please sign in to comment.