Skip to content

Conversation

@timostamm
Copy link
Member

@timostamm timostamm commented Aug 14, 2025

This PR updates the repository from TypeScript 5.6 to 5.9.

Important

TypeScript 5.9 includes breaking changes to lib.d.ts, forcing us to change return types for some functions from Uint8Array to Uint8Array<ArrayBuffer>.

A similar change was made in Protobuf-ES v2.7.0, and with this PR,@connectrpc/connect and related packages depend on @bufbuild/protobuf v2.7.0 or later.

If you are on TypeScript 5.7 or later, you will not see any issues, because it already ships with the new type parameter.

If you are on TypeScript 5.6 and earlier, you may be affected by this change. If you use Compression, Serialization, UniversalClientFn, UniversalHandlerFn or encodeEnvelope from @connectrpc/connect/protocol, the new type Uint8Array<ArrayBuffer> will become any, because the compiler does not understand the type.

If you are just using Connect clients or servers, you should not see any issues.

Signed-off-by: Timo Stamm <[email protected]>
@timostamm timostamm changed the title Update to TypeScript 5.9 Update to TypeScript 5.9 and change return types from Uint8Array to Uint8Array<ArrayBuffer> Aug 19, 2025
@timostamm timostamm marked this pull request as ready for review August 19, 2025 15:06
@timostamm timostamm merged commit 4eed0ce into main Aug 19, 2025
37 checks passed
@timostamm timostamm deleted the tstamm/Update-to-TypeScript-5.9 branch August 19, 2025 15:18
@timostamm timostamm mentioned this pull request Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants