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 Type mismatch when response is async function or returns promise #61

Open
rkhaslarov opened this issue Feb 9, 2022 · 2 comments
Open

Comments

@rkhaslarov
Copy link

Type '(response: FetchInterceptorResponse) => Promise' is not assignable to type '(response: FetchInterceptorResponse) => FetchInterceptorResponse'.

export interface FetchInterceptor {
request?(url: string, config: any): Promise<any[]> | any[];
requestError?(error: any): Promise;
response?(response: FetchInterceptorResponse): FetchInterceptorResponse;
responseError?(error: any): Promise;
}

So, the example of refresh token is not usable with ts...

@rkhaslarov
Copy link
Author

The example is here #39 (comment)

@gaspartripodiglobant
Copy link

Check this #60 (comment)

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

No branches or pull requests

2 participants