Skip to content

ref(ts): Avoid type assertion in useOrganizationMutationOptions#114788

Merged
evanpurkhiser merged 1 commit intomasterfrom
evanpurkhiser/ref-ts-avoid-type-assertion-in-useorganizationmutationoptions
May 4, 2026
Merged

ref(ts): Avoid type assertion in useOrganizationMutationOptions#114788
evanpurkhiser merged 1 commit intomasterfrom
evanpurkhiser/ref-ts-avoid-type-assertion-in-useorganizationmutationoptions

Conversation

@evanpurkhiser
Copy link
Copy Markdown
Member

as const on the array literal gives readonly [string] which satisfies ApiQueryKey structurally, so the explicit cast and the import are no longer needed.

Flagged by the type coverage bot on #113861 (comment).

@evanpurkhiser evanpurkhiser requested a review from scttcper May 4, 2026 22:02
@evanpurkhiser evanpurkhiser requested a review from a team as a code owner May 4, 2026 22:02
@evanpurkhiser evanpurkhiser enabled auto-merge (squash) May 4, 2026 22:02
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 4, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.40%

@evanpurkhiser evanpurkhiser merged commit 9704410 into master May 4, 2026
73 checks passed
@evanpurkhiser evanpurkhiser deleted the evanpurkhiser/ref-ts-avoid-type-assertion-in-useorganizationmutationoptions branch May 4, 2026 22:10
cleptric pushed a commit that referenced this pull request May 5, 2026
)

`as const` on the array literal gives `readonly [string]` which
satisfies `ApiQueryKey` structurally, so the explicit cast and the
import are no longer needed.

Flagged by the type coverage bot on
#113861 (comment).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants