-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat(fetch): cache strategy #340
Conversation
const response = await fetch({ | ||
url, | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
cacheStrategy: document.querySelector<HTMLSelectElement>('#cacheSelect')!.value as CacheStrategy, |
Check warning
Code scanning / ESLint
Disallow non-null assertions using the `!` postfix operator
} | ||
const retryFetch = (): Promise<Response> => { | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
options.retry!--; |
Check warning
Code scanning / ESLint
Disallow non-null assertions using the `!` postfix operator
clearTimeout(timeoutId); | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
if (options.retry! > 1 && response.status >= 502 && response.status <= 504) { |
Check warning
Code scanning / ESLint
Disallow non-null assertions using the `!` postfix operator
} | ||
catch (reason) { | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
if (timedOut && options.retry! > 1) { |
Check warning
Code scanning / ESLint
Disallow non-null assertions using the `!` postfix operator
Pull Request closed and locked due to lack of activity. |
No description provided.