Skip to content
New issue

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

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

Already on GitHub? # to your account

types: allow non strict HTTPMethod #3457

Merged
merged 1 commit into from
Aug 14, 2024
Merged

types: allow non strict HTTPMethod #3457

merged 1 commit into from
Aug 14, 2024

Conversation

Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Aug 14, 2024

fixes #3168

I still think, that it reduces the necessary strictness, as now also lowercased methods like "get" are allowed via types, but are invalid values.

So at transpile time we get no warning if the value is wrong. But atleast we keep the autocomplete capability.

I think that #3168 should be closed as on wont fix, but here is the solution.

For more inforation for the solution see fastify/fastify#5046

@Uzlopak Uzlopak requested review from ronag and KhafraDev August 14, 2024 13:13
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@KhafraDev KhafraDev merged commit 6f912bf into nodejs:main Aug 14, 2024
32 checks passed
@Uzlopak Uzlopak deleted the fix-3168 branch August 14, 2024 15:52
@github-actions github-actions bot mentioned this pull request Dec 3, 2024
This was referenced Dec 16, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Type 'string' is not assignable to type 'HttpMethod'.ts(2345)
3 participants