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

refactor: use as const instead of enum in http methods #2448

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nayounsang
Copy link

Abstract

  • Use as const object in http methods.

Description

  • No effect on existing behavior
  • However, It can improve DX. It can be used as an object, allowing iterable code to be written, and also operates as a union type.
  • The bundle size will not change significantly. This is focused on DX. (only reduce 0.2KB, test with source-map-explorer)

Why not try as const?

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.

1 participant