File tree 2 files changed +17
-2
lines changed
2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @graphql-tools/utils ' : patch
3
+ ---
4
+
5
+ fix(utils): support old TypeScript versions
Original file line number Diff line number Diff line change 1
- /// <reference lib="es2021.promise" />
2
- let AggregateErrorImpl = globalThis . AggregateError ;
1
+ // Backwards compability for old versions of TypeScript
2
+ interface AggregateError extends Error {
3
+ errors : any [ ] ;
4
+ }
5
+
6
+ interface AggregateErrorConstructor {
7
+ new ( errors : Iterable < any > , message ?: string ) : AggregateError ;
8
+ ( errors : Iterable < any > , message ?: string ) : AggregateError ;
9
+ readonly prototype : AggregateError ;
10
+ }
11
+
12
+ let AggregateErrorImpl : AggregateErrorConstructor = globalThis . AggregateError ;
3
13
4
14
if ( typeof AggregateErrorImpl === 'undefined' ) {
5
15
class AggregateErrorClass extends Error implements AggregateError {
You can’t perform that action at this time.
0 commit comments