Support TypeScript 5.9 (#21539)

### What does this PR do?

Fixes #21535

### How did you verify your code works?
This commit is contained in:
Alistair Smith
2025-08-01 16:09:44 -07:00
committed by GitHub
parent 0cf2b71ff1
commit d0edcc69ae
21 changed files with 507 additions and 207 deletions

View File

@@ -208,8 +208,8 @@ export class ArrayBufferSink {
*
* This API might change later to separate Uint8ArraySink and ArrayBufferSink
*/
flush(): number | Uint8Array | ArrayBuffer;
end(): ArrayBuffer | Uint8Array;
flush(): number | Uint8Array<ArrayBuffer> | ArrayBuffer;
end(): ArrayBuffer | Uint8Array<ArrayBuffer>;
}
```

View File

@@ -14,7 +14,7 @@ if (typeof Bun !== "undefined") {
---
In TypeScript environments, the previous approach will result in a type error unless `bun-types` is globally installed. To avoid this, you can check `process.versions` instead.
In TypeScript environments, the previous approach will result in a type error unless `@types/bun` is installed. To avoid this, you can check `process.versions` instead.
```ts
if (process.versions.bun) {