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

Wrong type parameter order on SWRMutationResponse trigger #2667

Closed
Riley19280 opened this issue Jun 14, 2023 · 0 comments · Fixed by #2669
Closed

Wrong type parameter order on SWRMutationResponse trigger #2667

Riley19280 opened this issue Jun 14, 2023 · 0 comments · Fixed by #2669

Comments

@Riley19280
Copy link

Riley19280 commented Jun 14, 2023

Bug report

Description / Observed Behavior

Trigger argument on SWRMutationResponse is typed as

trigger: [ExtraArg] extends [never] ? 
TriggerWithoutArgs<Data, Error, ExtraArg, SWRMutationKey> 
 : TriggerWithArgs<Data, Error, SWRMutationKey, ExtraArg>;

but TriggerWithoutArgs

is defined as

interface TriggerWithoutArgs<Data = any, Error = any, SWRMutationKey extends Key = Key, ExtraArg = never>

Seems that the type parameter order with ExtraArg and SWRMutationKey is backwards. Is this intentional or just a typo?

Happy to submit a PR if needed

Additional Context

SWR version: 2.2.1-beta.0

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 a pull request may close this issue.

1 participant