Skip to content

Commit 044336d

Browse files
committed
Add DOM to tsconfig libs
This is a nauseating workaround to allow typescript packages to compile using more recent versions of the `@node/types` package. It adds `DOM` to the list of libs in `tsconfig.json`, which tells the Typscript compiler about the `AbortController` and related types. Fixes estuary#279
1 parent 5fb28e9 commit 044336d

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

crates/build/src/nodejs/snapshots/build__nodejs__scenario_test__scenario.snap

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,12 @@ expression: intents
410410
"forceConsistentCasingInFileNames": true,
411411
"incremental": true,
412412
"lib": [
413-
"ES2019"
413+
"ES2019",
414+
// DOM is added here only to provide the `AbortController` types, which are
415+
// used by other nodejs types. This fix was taken from
416+
// (https://stackoverflow.com/a/59893096) to fix the Typescript compilation
417+
// issue described in estuary/flow#279
418+
"DOM"
414419
],
415420
"module": "commonjs",
416421
"noEmitOnError": true,
@@ -435,5 +440,6 @@ expression: intents
435440
}
436441
},
437442
"extends": "./flow_generated/tsconfig-files"
438-
},
443+
}
444+
,
439445
}

tsconfig.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55
"forceConsistentCasingInFileNames": true,
66
"incremental": true,
77
"lib": [
8-
"ES2019"
8+
"ES2019",
9+
// DOM is added here only to provide the `AbortController` types, which are
10+
// used by other nodejs types. This fix was taken from
11+
// (https://stackoverflow.com/a/59893096) to fix the Typescript compilation
12+
// issue described in estuary/flow#279
13+
"DOM"
914
],
1015
"module": "commonjs",
1116
"noEmitOnError": true,
@@ -30,4 +35,4 @@
3035
}
3136
},
3237
"extends": "./flow_generated/tsconfig-files"
33-
}
38+
}

0 commit comments

Comments
 (0)