Skip to content

Commit

Permalink
feat: remove typescript only interface export (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
saihaj committed Aug 16, 2021
1 parent 1723186 commit b9def62
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 20 deletions.
3 changes: 1 addition & 2 deletions src/connection/arrayConnection.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import type {
ConnectionCursor,
} from './connection';

// TS_SPECIFIC: This type is only exported by TypeScript
export interface ArraySliceMetaInfo {
interface ArraySliceMetaInfo {
sliceStart: number;
arrayLength: number;
}
Expand Down
6 changes: 2 additions & 4 deletions src/connection/connection.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import type {
Thunk,
} from 'graphql';

// TS_SPECIFIC: This type is only exported by TypeScript. Flow uses the spread operator instead.
export interface ForwardConnectionArgs {
interface ForwardConnectionArgs {
after: { type: GraphQLScalarType };
first: { type: GraphQLScalarType };
}
Expand All @@ -22,8 +21,7 @@ export interface ForwardConnectionArgs {
export const forwardConnectionArgs: GraphQLFieldConfigArgumentMap &
ForwardConnectionArgs;

// TS_SPECIFIC: This type is only exported by TypeScript. Flow uses the spread operator instead.
export interface BackwardConnectionArgs {
interface BackwardConnectionArgs {
before: { type: GraphQLScalarType };
last: { type: GraphQLScalarType };
}
Expand Down
10 changes: 2 additions & 8 deletions src/mutation/mutation.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,8 @@ import type {
Thunk,
} from 'graphql';

// TS_SPECIFIC: This type is only exported by TypeScript
export type MutationFn = (
object: any,
ctx: any,
info: GraphQLResolveInfo,
) => unknown;
type MutationFn = (object: any, ctx: any, info: GraphQLResolveInfo) => unknown;

// TS_SPECIFIC: This type is only exported by TypeScript
/**
* A description of a mutation consumable by mutationWithClientMutationId
* to create a GraphQLFieldConfig for that mutation.
Expand All @@ -29,7 +23,7 @@ export type MutationFn = (
* input field, and it should return an Object with a key for each
* output field. It may return synchronously, or return a Promise.
*/
export interface MutationConfig {
interface MutationConfig {
name: string;
description?: string;
deprecationReason?: string;
Expand Down
6 changes: 2 additions & 4 deletions src/node/node.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import type {
GraphQLTypeResolver,
} from 'graphql';

// TS_SPECIFIC: This type is only exported by TypeScript
export interface GraphQLNodeDefinitions<TContext> {
interface GraphQLNodeDefinitions<TContext> {
nodeInterface: GraphQLInterfaceType;
nodeField: GraphQLFieldConfig<any, TContext>;
nodesField: GraphQLFieldConfig<any, TContext>;
Expand All @@ -31,8 +30,7 @@ export function nodeDefinitions<TContext>(
typeResolver?: GraphQLTypeResolver<any, TContext>,
): GraphQLNodeDefinitions<TContext>;

// TS_SPECIFIC: This type is only exported by TypeScript
export interface ResolvedGlobalId {
interface ResolvedGlobalId {
type: string;
id: string;
}
Expand Down
3 changes: 1 addition & 2 deletions src/node/plural.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import type {
GraphQLResolveInfo,
} from 'graphql';

// TS_SPECIFIC: This type is only exported by TypeScript
export interface PluralIdentifyingRootFieldConfig {
interface PluralIdentifyingRootFieldConfig {
argName: string;
inputType: GraphQLInputType;
outputType: GraphQLOutputType;
Expand Down

0 comments on commit b9def62

Please sign in to comment.