You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the code works correctly as expected, but after adding some deps to my project the version of swr was updated too (as expected since it has the ^ prefix in the package.json to the version 2.2.4), and I started receiving the following error: No overload matches this call. The last overload gave the following error. Type '([url, params]: [url: string, params?: Record<string, string> | undefined]) => Promise<any>' has no properties in common with type 'Partial<PublicConfiguration<Investment[], Error, BareFetcher<Investment[]>>>'
The question is, Is this expected?
I fixed it by pinning the dependency (while I fix the type issue with the new version)
Expected Behavior
How did you expect SWR to behave here?
I expect that updating a minor version, the API of the hook keeps the same.
This started happening from release v2.2.3 from the removal of a type in #2759. Adding this back to the SWRHook interface or reverting to a version before v2.2.3 address the type error you got.
Bug report
Description / Observed Behavior
What kind of issues did you encounter with SWR?
I have a project that used the version
^2.1.5
(using the caret for compatible with version), it looked like ->My code looks like ->
the code works correctly as expected, but after adding some deps to my project the version of
swr
was updated too (as expected since it has the ^ prefix in the package.json to the version 2.2.4), and I started receiving the following error:No overload matches this call. The last overload gave the following error. Type '([url, params]: [url: string, params?: Record<string, string> | undefined]) => Promise<any>' has no properties in common with type 'Partial<PublicConfiguration<Investment[], Error, BareFetcher<Investment[]>>>'
The question is, Is this expected?
I fixed it by pinning the dependency (while I fix the type issue with the new version)
Expected Behavior
How did you expect SWR to behave here?
I expect that updating a minor version, the API of the hook keeps the same.
Repro Steps / Code Example
Here is a [CodeSandbox](https://codesandbox.io) link the error is in
app/hook.ts
The text was updated successfully, but these errors were encountered: