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
constkey=`some graphql query with variables`;constentityId=1;constfetcher=(key: string,entityId: number)=>{ ... }const{ data }=useSWR([key,entityId],fetcher);
If you now inverse the arguments of fetcher, TypeScript doesn't report a type error even though it would be receiving the wrong parameters in runtime.
The text was updated successfully, but these errors were encountered:
enzoferey
changed the title
[TypeScript Fetcher function doesn't respect array of keys types
[TypeScript] Fetcher function doesn't respect array of keys types
Apr 6, 2020
TLadd
added a commit
to TLadd/swr
that referenced
this issue
Jul 30, 2020
With a piece of code like:
If you now inverse the arguments of
fetcher
, TypeScript doesn't report a type error even though it would be receiving the wrong parameters in runtime.The text was updated successfully, but these errors were encountered: