Skip to content

Commit

Permalink
Fix return types for createRequestError, formatGraphQLErrors
Browse files Browse the repository at this point in the history
  • Loading branch information
David Emanuel Luksic committed Mar 31, 2020
1 parent c0e3145 commit 49020e7
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,5 +303,16 @@ export type GraphQLResponseErrors = Array<{
stack?: string[];
}>;

export function createRequestError(request: RelayRequestAny, response?: RelayResponse);
export function formatGraphQLErrors(request: RelayRequest, errors: GraphQLResponseErrors);
export default class RRNLError extends Error {
constructor(msg: string);
}

export class RRNLRequestError extends RRNLError {
req: RelayRequestAny;
res?: RelayResponse;

constructor(msg: string);
}

export function createRequestError(request: RelayRequestAny, response?: RelayResponse): RRNLRequestError;
export function formatGraphQLErrors(request: RelayRequest, errors: GraphQLResponseErrors): string;

0 comments on commit 49020e7

Please sign in to comment.