Skip to content

V2: Bump supported version of TypeScript to 4.9.5#805

Merged
timostamm merged 2 commits intov2from
tstamm/bump-min-ts
Apr 23, 2024
Merged

V2: Bump supported version of TypeScript to 4.9.5#805
timostamm merged 2 commits intov2from
tstamm/bump-min-ts

Conversation

@timostamm
Copy link
Member

v4.9 was released well over two years ago.

When we first released protobuf-es, the minimum supported version of TypeScript - v4.1 - was about as old. So it seems reasonable to support a similar range of older versions with v2 of protobuf-es.

Comment on lines +23 to +27
import {
type MessageInitShape,
type DescMessage,
protoInt64,
} from "@bufbuild/protobuf";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can not use type-only specifiers in imports, a feature added by TS v4.5.

// @ts-ignore -- required for older TS
case: "oneofInt64Field",
// @ts-ignore -- required for older TS
// @ts-expect-error expected type error
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In tests, we can replace some @ts-ignore annotations with @ts-expect-error, since all supported versions of TS produce an error here.

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.

2 participants