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

Fix the type of the Hyperdrive binding's port field #1968

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

a-robinson
Copy link
Member

It is returned as a number in the implementation of the binding (both in prod and in local development), not a string. This was purely an error in the types.

Noticed in cloudflare/cloudflare-docs#13763 (comment)


Confirmed both by checking the return type in our source code (uint16_t) and by running console.log(typeof(env.HYPERDRIVE.port)); within a worker at the edge and getting back number.

It is returned as a number in the implementation of the binding (both in
prod and in local development), not a string. This was purely an error
in the types.
@a-robinson a-robinson requested review from a team as code owners April 4, 2024 18:59
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.

None yet

3 participants