forked from zphhhhh/axios-localstorage-adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
17 lines (16 loc) · 756 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
interface AxiosLocalStorageAdapterOptions {
/** set cache name as localstorage's key's prefix, default to 'axios_cache' */
name?: string,
/** set max age for cache, default to 1 hour */
maxAge?: number,
/** set exclude condition, default to [] */
exclude?: string| RegExp | Function | (string|RegExp|Function)[],
/** set if clear on localstorage's error, default to true */
clearOnError?: boolean,
/** set default adapter, default to axios.defaults.adapter */
adapter?: AxiosAdapter,
/** set false to cache no request in development, default to true */
cache?: boolean
}
declare function AxiosLocalStorageAdapter(opts: AxiosLocalStorageAdapterOptions): AxiosAdapter;
export default AxiosLocalStorageAdapter;