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 037caf9
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions tstypes/type/scalars.d.ts
Original file line number Diff line number Diff line change
@@ -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<GraphQLScalarType>;

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

0 comments on commit 037caf9

Please sign in to comment.