Fixes to support building under TypeScript 5.9 #4834
+26
−14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type
Description
This fixes compile-time errors discovered when running tests for updated DOM types in TypeScript 5.9. This also addresses compile-time errors resulting from a change in TypeScript 5.8 where the global
ArrayBuffer
type is now distinct fromSharedArrayBuffer
and various typed arrays.The changes herein are primarily internal casts to a more concrete type. Avoiding the casts would require more extensive changes to effect that I would rather leave up to the maintainers. The only non-cast change is to address a bug in
HttpIncomingMessage
which declares anarrayBuffer
property that returns an effect forArrayBuffer
, but was actually returning an effect for aUint8Array
.Some of the underlying errors can be seen by upgrading the version of
typescript
in the repository'spackage.json
. Errors related to invalid casts to anIDBValidKey
require the updated DOM types from microsoft/TypeScript#61647.Related
microsoft/TypeScript#61647 (comment)