UNPKG

fexios

Version:

Fetch based HTTP client with similar API to axios for browser and Node.js

19 lines (16 loc) 771 B
type Func<Args extends unknown[], Return> = (...args: Args) => Return; interface CallableInstanceConstructor { new <Args extends unknown[], Return>(property: string | symbol): Func<Args, Return> & CallableInstance<Args, Return>; readonly prototype: CallableInstance<any, any>; } interface CallableInstance<Args extends unknown[], Return> extends Function { (...args: Args): Return; } declare const CallableInstance: CallableInstanceConstructor; /** * Check if given payload is a plain object * "Plain object" means it is not an instance of any class or built-in type, * or just like Record<string, any> in TypeScript. */ declare function isPlainObject(payload: any): payload is Record<string, any>; export { CallableInstance as C, isPlainObject as i };