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

TS throws after changing useSWR typings #1621

Closed
Kamahl19 opened this issue Nov 5, 2021 · 1 comment
Closed

TS throws after changing useSWR typings #1621

Kamahl19 opened this issue Nov 5, 2021 · 1 comment

Comments

@Kamahl19
Copy link

Kamahl19 commented Nov 5, 2021

Bug report

Description / Observed Behavior

Type '(org: string, repo: string) => Promise<any>' is not assignable to type '((args_0: string) => FetcherResponse<{ name: string; description: string; }>) | ((args_0: any, ...args_1: unknown[]) => FetcherResponse<{ name: string; description: string; }>) | ((args_0: Record<...>) => FetcherResponse<...>) | ((args_0: string | ... 2 more ... | Record<...>) => FetcherResponse<...>) | null'.ts(2769)

This error occurres when i use multiple arguments and generics for data

Repro Steps / Code Example

https://codesandbox.io/s/create-react-app-typescript-forked-yjc49?file=/src/index.tsx

Additional Context

Happening since 1.1.0-beta-3 , even on beta 7

@shuding
Copy link
Member

shuding commented Nov 26, 2021

Closed by #1640.

@shuding shuding closed this as completed Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants