xior
Version:
A lite http request lib based on fetch with plugins support and similar API to axios.
19 lines (16 loc) • 667 B
text/typescript
import { a as XiorRequestConfig, e as XiorPlugin } from '../xior-D4BXsC0R.mjs';
type XiorDedupeOptions = {
/**
* check if we need enable throttle, default only `GET` method or`isGet: true` enable
*/
enableDedupe?: boolean | ((config?: XiorRequestConfig) => boolean);
onDedupe?: (config: XiorRequestConfig) => void;
};
/** @ts-ignore */
declare module 'xior' {
interface XiorRequestConfig extends Omit<XiorDedupeOptions, 'dedupeCache'> {
}
}
declare const inflight: Map<string, any[]>;
declare function xiorDedupePlugin(options?: XiorDedupeOptions): XiorPlugin;
export { type XiorDedupeOptions, xiorDedupePlugin as default, inflight };