File tree 3 files changed +10
-9
lines changed
3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import ExtendableError from 'extendable-error';
2
2
export interface ErrorConfig {
3
3
message : string ;
4
4
time_thrown ?: string ;
5
- data ?: any ;
5
+ data ?: object ;
6
6
options ?: {
7
7
showPath ?: boolean ;
8
8
showLocations ?: boolean ;
@@ -12,15 +12,15 @@ export interface ErrorInfo {
12
12
message : string ;
13
13
name : string ;
14
14
time_thrown : string ;
15
- data ?: { } ;
15
+ data ?: object ;
16
16
path ?: string ;
17
17
locations ?: any ;
18
18
}
19
19
export declare class ApolloError extends ExtendableError {
20
20
name : string ;
21
21
message : string ;
22
22
time_thrown : string ;
23
- data : any ;
23
+ data : object ;
24
24
path : any ;
25
25
locations : any ;
26
26
_showLocations : boolean ;
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ const isObject = d => Object.prototype.toString.call(d) === '[object Object]';
7
7
export interface ErrorConfig {
8
8
message : string ;
9
9
time_thrown ?: string ;
10
- data ?: any ;
10
+ data ?: object ;
11
11
options ?: {
12
12
showPath ?: boolean ;
13
13
showLocations ?: boolean ;
@@ -18,7 +18,7 @@ export interface ErrorInfo {
18
18
message : string ;
19
19
name : string ;
20
20
time_thrown : string ;
21
- data ?: { } ;
21
+ data ?: object ;
22
22
path ?: string ;
23
23
locations ?: any ;
24
24
}
@@ -27,7 +27,7 @@ export class ApolloError extends ExtendableError {
27
27
name : string ;
28
28
message : string ;
29
29
time_thrown : string ;
30
- data : any ;
30
+ data : object ;
31
31
path : any ;
32
32
locations : any ;
33
33
_showLocations : boolean = false ;
@@ -39,8 +39,9 @@ export class ApolloError extends ExtendableError {
39
39
const t = ( arguments [ 2 ] && arguments [ 2 ] . time_thrown ) || ( new Date ( ) ) . toISOString ( ) ;
40
40
const m = ( arguments [ 2 ] && arguments [ 2 ] . message ) || '' ;
41
41
const configData = ( arguments [ 2 ] && arguments [ 2 ] . data ) || { } ;
42
- const d = { ...this . data , ...configData }
43
- const opts = ( ( arguments [ 2 ] && arguments [ 2 ] . options ) || { } )
42
+ const d = { ...this . data , ...configData } ;
43
+ const opts = ( ( arguments [ 2 ] && arguments [ 2 ] . options ) || { } ) ;
44
+
44
45
45
46
this . name = name ;
46
47
this . message = m ;
You can’t perform that action at this time.
0 commit comments