Skip to content

Commit 3909ba3

Browse files
authored
fix: remove ts-ignore (#102)
1 parent f023497 commit 3909ba3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ node_modules/
77
dist/
88
esm/
99
lib/
10+
yarn.lock

src/throttleAdapterEnhancer.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @since 2017-10-11
55
*/
66

7-
import { AxiosAdapter, AxiosPromise, AxiosRequestConfig } from 'axios';
7+
import { AxiosAdapter, AxiosPromise, InternalAxiosRequestConfig } from 'axios';
88
import LRUCache from 'lru-cache';
99
import buildSortedURL from './utils/buildSortedURL';
1010
import { ICacheLike } from './utils/isCacheLike';
@@ -21,14 +21,13 @@ export type Options = {
2121

2222
export default function throttleAdapterEnhancer(adapter: AxiosAdapter, options: Options = {}): AxiosAdapter {
2323

24-
const { threshold = 1000, cache = new LRUCache<string, RecordedCache>({ max: 10 }) } = options;
24+
const { threshold = 1000, cache = new LRUCache<string, RecordedCache>({ max: 10 }) } = options;
2525

26-
const recordCacheWithRequest = (index: string, config: AxiosRequestConfig) => {
26+
const recordCacheWithRequest = (index: string, config: InternalAxiosRequestConfig) => {
2727

2828
const responsePromise = (async () => {
2929

3030
try {
31-
// @ts-ignore
3231
const response = await adapter(config);
3332

3433
cache.set(index, {

0 commit comments

Comments
 (0)