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

chore: remove unnecessary type assertions #313

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

dsanders11
Copy link
Member

It's not necessary to use <const>/as const here because the implicit type is already correct. Since the code is directly returning the objects as the value for a typed key, type inference works correctly and the string literals are correctly typed as literals.

@dsanders11 dsanders11 marked this pull request as ready for review October 3, 2024 02:25
@dsanders11 dsanders11 requested a review from a team as a code owner October 3, 2024 02:25
@dsanders11 dsanders11 merged commit 75dd9a6 into main Oct 3, 2024
3 checks passed
@dsanders11 dsanders11 deleted the chore/remove-unnecessary-type-assertions branch October 3, 2024 02:57
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