Commit e4c2fff
authored
fix(types): restore brotli in CompressionFormat for dom/webworker libs (#34349)
The TypeScript 6.0.3 update (#32944) regenerated `lib.dom.d.ts` and
`lib.webworker.d.ts` from upstream and dropped the brotli patch we had
applied to `CompressionFormat`. Projects whose `compilerOptions.lib`
includes `dom` or `webworker` then fail to type-check
`new CompressionStream("brotli")`, even though Deno supports brotli at
runtime.
Type aliases can't be merged across lib files, so the patch has to live
in the vendored TypeScript libs themselves. To stop this from regressing
silently on the next upgrade, this also adds a small spec test that
runs `deno check` against `CompressionStream("brotli")` /
`DecompressionStream("brotli")` under the default, `dom`, and
`webworker` lib configurations.
Fixes #343241 parent 5bd5a3b commit e4c2fff
6 files changed
Lines changed: 34 additions & 2 deletions
File tree
- cli/tsc/dts
- tests/specs/check/compression_stream_brotli
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44283 | 44283 | | |
44284 | 44284 | | |
44285 | 44285 | | |
44286 | | - | |
| 44286 | + | |
44287 | 44287 | | |
44288 | 44288 | | |
44289 | 44289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15087 | 15087 | | |
15088 | 15088 | | |
15089 | 15089 | | |
15090 | | - | |
| 15090 | + | |
15091 | 15091 | | |
15092 | 15092 | | |
15093 | 15093 | | |
| |||
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments