This repository has been archived on 2023-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
react-rest-request/target/request_context.d.ts

10 lines
462 B
TypeScript
Raw Normal View History

2021-06-15 00:11:58 +03:00
import React from 'react';
import { Client } from './client';
2021-06-23 02:30:19 +03:00
export interface RequestContextData {
readonly client: Client;
readonly defaultHeaders?: Record<string, string>;
}
2021-06-15 00:11:58 +03:00
export declare type RequestProviderProps = Readonly<React.PropsWithChildren<RequestContextData>>;
export declare function RequestProvider({ client, defaultHeaders, children }: RequestProviderProps): JSX.Element;
2021-06-23 02:30:19 +03:00
export declare function useRequestContext(): RequestContextData;