diff options
author | Scoots Dash <contact@minteck.org> | 2022-04-23 14:12:30 +0000 |
---|---|---|
committer | Scoots Dash <contact@minteck.org> | 2022-04-23 14:12:30 +0000 |
commit | a927497b43cbe1438f3d7478932f3f7d03ea347c (patch) | |
tree | 0a3c88978b4294fb30afad58daa86c46fbedc2f6 /node_modules/axios/index.d.ts | |
parent | ba5fa694351774f2684c1aefdc215da5c6f39ba6 (diff) | |
parent | f0db5bbbcd623812a391862d217519afafe197c6 (diff) | |
download | twilight-trunk.tar.gz twilight-trunk.tar.bz2 twilight-trunk.zip |
Disable the Twilight Package Manager
See merge request minteck/twilight!1
Diffstat (limited to 'node_modules/axios/index.d.ts')
-rw-r--r-- | node_modules/axios/index.d.ts | 221 |
1 files changed, 0 insertions, 221 deletions
diff --git a/node_modules/axios/index.d.ts b/node_modules/axios/index.d.ts deleted file mode 100644 index b681915..0000000 --- a/node_modules/axios/index.d.ts +++ /dev/null @@ -1,221 +0,0 @@ -// TypeScript Version: 3.0 - -export type AxiosRequestHeaders = Record<string, string | number | boolean>; - -export type AxiosResponseHeaders = Record<string, string> & { - "set-cookie"?: string[] -}; - -export interface AxiosRequestTransformer { - (data: any, headers?: AxiosRequestHeaders): any; -} - -export interface AxiosResponseTransformer { - (data: any, headers?: AxiosResponseHeaders): any; -} - -export interface AxiosAdapter { - (config: AxiosRequestConfig): AxiosPromise; -} - -export interface AxiosBasicCredentials { - username: string; - password: string; -} - -export interface AxiosProxyConfig { - host: string; - port: number; - auth?: { - username: string; - password: string; - }; - protocol?: string; -} - -export type Method = - | 'get' | 'GET' - | 'delete' | 'DELETE' - | 'head' | 'HEAD' - | 'options' | 'OPTIONS' - | 'post' | 'POST' - | 'put' | 'PUT' - | 'patch' | 'PATCH' - | 'purge' | 'PURGE' - | 'link' | 'LINK' - | 'unlink' | 'UNLINK'; - -export type ResponseType = - | 'arraybuffer' - | 'blob' - | 'document' - | 'json' - | 'text' - | 'stream'; - - export type responseEncoding = - | 'ascii' | 'ASCII' - | 'ansi' | 'ANSI' - | 'binary' | 'BINARY' - | 'base64' | 'BASE64' - | 'base64url' | 'BASE64URL' - | 'hex' | 'HEX' - | 'latin1' | 'LATIN1' - | 'ucs-2' | 'UCS-2' - | 'ucs2' | 'UCS2' - | 'utf-8' | 'UTF-8' - | 'utf8' | 'UTF8' - | 'utf16le' | 'UTF16LE'; - -export interface TransitionalOptions { - silentJSONParsing?: boolean; - forcedJSONParsing?: boolean; - clarifyTimeoutError?: boolean; -} - -export interface AxiosRequestConfig<D = any> { - url?: string; - method?: Method; - baseURL?: string; - transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[]; - transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[]; - headers?: AxiosRequestHeaders; - params?: any; - paramsSerializer?: (params: any) => string; - data?: D; - timeout?: number; - timeoutErrorMessage?: string; - withCredentials?: boolean; - adapter?: AxiosAdapter; - auth?: AxiosBasicCredentials; - responseType?: ResponseType; - responseEncoding?: responseEncoding | string; - xsrfCookieName?: string; - xsrfHeaderName?: string; - onUploadProgress?: (progressEvent: any) => void; - onDownloadProgress?: (progressEvent: any) => void; - maxContentLength?: number; - validateStatus?: ((status: number) => boolean) | null; - maxBodyLength?: number; - maxRedirects?: number; - socketPath?: string | null; - httpAgent?: any; - httpsAgent?: any; - proxy?: AxiosProxyConfig | false; - cancelToken?: CancelToken; - decompress?: boolean; - transitional?: TransitionalOptions; - signal?: AbortSignal; - insecureHTTPParser?: boolean; -} - -export interface HeadersDefaults { - common: AxiosRequestHeaders; - delete: AxiosRequestHeaders; - get: AxiosRequestHeaders; - head: AxiosRequestHeaders; - post: AxiosRequestHeaders; - put: AxiosRequestHeaders; - patch: AxiosRequestHeaders; - options?: AxiosRequestHeaders; - purge?: AxiosRequestHeaders; - link?: AxiosRequestHeaders; - unlink?: AxiosRequestHeaders; -} - -export interface AxiosDefaults<D = any> extends Omit<AxiosRequestConfig<D>, 'headers'> { - headers: HeadersDefaults; -} - -export interface AxiosResponse<T = any, D = any> { - data: T; - status: number; - statusText: string; - headers: AxiosResponseHeaders; - config: AxiosRequestConfig<D>; - request?: any; -} - -export interface AxiosError<T = any, D = any> extends Error { - config: AxiosRequestConfig<D>; - code?: string; - request?: any; - response?: AxiosResponse<T, D>; - isAxiosError: boolean; - toJSON: () => object; -} - -export interface AxiosPromise<T = any> extends Promise<AxiosResponse<T>> { -} - -export interface CancelStatic { - new (message?: string): Cancel; -} - -export interface Cancel { - message: string | undefined; -} - -export interface Canceler { - (message?: string): void; -} - -export interface CancelTokenStatic { - new (executor: (cancel: Canceler) => void): CancelToken; - source(): CancelTokenSource; -} - -export interface CancelToken { - promise: Promise<Cancel>; - reason?: Cancel; - throwIfRequested(): void; -} - -export interface CancelTokenSource { - token: CancelToken; - cancel: Canceler; -} - -export interface AxiosInterceptorManager<V> { - use<T = V>(onFulfilled?: (value: V) => T | Promise<T>, onRejected?: (error: any) => any): number; - eject(id: number): void; -} - -export class Axios { - constructor(config?: AxiosRequestConfig); - defaults: AxiosDefaults; - interceptors: { - request: AxiosInterceptorManager<AxiosRequestConfig>; - response: AxiosInterceptorManager<AxiosResponse>; - }; - getUri(config?: AxiosRequestConfig): string; - request<T = any, R = AxiosResponse<T>, D = any>(config: AxiosRequestConfig<D>): Promise<R>; - get<T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>; - delete<T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>; - head<T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>; - options<T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>; - post<T = any, R = AxiosResponse<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig<D>): Promise<R>; - put<T = any, R = AxiosResponse<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig<D>): Promise<R>; - patch<T = any, R = AxiosResponse<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig<D>): Promise<R>; -} - -export interface AxiosInstance extends Axios { - (config: AxiosRequestConfig): AxiosPromise; - (url: string, config?: AxiosRequestConfig): AxiosPromise; -} - -export interface AxiosStatic extends AxiosInstance { - create(config?: AxiosRequestConfig): AxiosInstance; - Cancel: CancelStatic; - CancelToken: CancelTokenStatic; - Axios: typeof Axios; - readonly VERSION: string; - isCancel(value: any): boolean; - all<T>(values: Array<T | Promise<T>>): Promise<T[]>; - spread<T, R>(callback: (...args: T[]) => R): (array: T[]) => R; - isAxiosError(payload: any): payload is AxiosError; -} - -declare const axios: AxiosStatic; - -export default axios; |