Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2: Bump supported version of TypeScript to 4.9.5 #805

Merged
merged 2 commits into from
Apr 23, 2024
Merged

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.

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