Skip to content

Commit

Permalink
fix(@apollo/*): export ApolloError type (#3613)
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards1211 authored and AndrewSouthpaw committed Nov 14, 2019
1 parent 822e55b commit 35be10a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -669,13 +669,14 @@ declare module '@apollo/react-common' {
...,
};

declare class ApolloError extends Error {
declare class $ApolloError extends Error {
message: string;
graphQLErrors: Array<GraphQLError>;
networkError: Error | null;
extraInfo: any;
constructor(info: ErrorConstructor): this;
}
declare export type ApolloError = $ApolloError;

declare interface ErrorConstructor {
graphQLErrors?: Array<GraphQLError>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,13 +405,14 @@ declare module '@apollo/react-components' {
...,
};

declare class ApolloError extends Error {
declare class $ApolloError extends Error {
message: string;
graphQLErrors: Array<GraphQLError>;
networkError: Error | null;
extraInfo: any;
constructor(info: ErrorConstructor): this;
}
declare export type ApolloError = $ApolloError;

declare interface ErrorConstructor {
graphQLErrors?: Array<GraphQLError>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,13 +387,14 @@ declare module '@apollo/react-components' {
[queryName: string]: MutationQueryReducer<T>,
};

declare class ApolloError extends Error {
declare class $ApolloError extends Error {
message: string;
graphQLErrors: Array<GraphQLError>;
networkError: Error | null;
extraInfo: any;
constructor(info: ErrorConstructor): this;
}
declare export type ApolloError = $ApolloError;

declare interface ErrorConstructor {
graphQLErrors?: Array<GraphQLError>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
declare module '@apollo/react-hoc' {
import type { ComponentType, Element, Node } from 'react';

declare type Dict = { [key: string]: any, ...};


declare type MakeOptional = <V>(V) => ?V;
declare type MakeDataOptional<TData> = $ObjMap<TData, MakeOptional> | void;
Expand Down Expand Up @@ -400,13 +400,14 @@ declare module '@apollo/react-hoc' {
T = { [key: string]: any, ... }
> = { [queryName: string]: MutationQueryReducer<T>, ... };

declare class ApolloError extends Error {
declare class $ApolloError extends Error {
message: string;
graphQLErrors: Array<GraphQLError>;
networkError: Error | null;
extraInfo: any;
constructor(info: ErrorConstructor): this;
}
declare export type ApolloError = $ApolloError;

declare interface ErrorConstructor {
graphQLErrors?: Array<GraphQLError>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -806,13 +806,14 @@ declare module '@apollo/react-hooks' {
...,
};

declare class ApolloError extends Error {
declare class $ApolloError extends Error {
message: string;
graphQLErrors: Array<GraphQLError>;
networkError: Error | null;
extraInfo: any;
constructor(info: ErrorConstructor): this;
}
declare export type ApolloError = $ApolloError;

declare interface ErrorConstructor {
graphQLErrors?: Array<GraphQLError>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -699,13 +699,14 @@ declare module '@apollo/react-hooks' {
[queryName: string]: MutationQueryReducer<T>,
};

declare class ApolloError extends Error {
declare class $ApolloError extends Error {
message: string;
graphQLErrors: Array<GraphQLError>;
networkError: Error | null;
extraInfo: any;
constructor(info: ErrorConstructor): this;
}
declare export type ApolloError = $ApolloError;

declare interface ErrorConstructor {
graphQLErrors?: Array<GraphQLError>;
Expand Down

0 comments on commit 35be10a

Please sign in to comment.