nestjs-http-promise/lib/interfaces/http-module.interface.ts
Conicaw d339488805
style: add import linting
Add import linting
2023-11-14 19:50:10 +04:00

19 lines
719 B
TypeScript

import type { ModuleMetadata, Provider, Type } from '@nestjs/common';
import type { AxiosRequestConfig } from 'axios';
import type IAxiosRetry from 'axios-retry';
export type HttpModuleOptions = AxiosRequestConfig &
IAxiosRetry.IAxiosRetryConfig & { isBetterStackTraceEnabled?: boolean };
export interface HttpModuleOptionsFactory {
createHttpOptions(): Promise<HttpModuleOptions> | HttpModuleOptions;
}
export interface HttpModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
useExisting?: Type<HttpModuleOptionsFactory>;
useClass?: Type<HttpModuleOptionsFactory>;
useFactory?: (...args: any[]) => Promise<HttpModuleOptions> | HttpModuleOptions;
inject?: any[];
extraProviders?: Provider[];
}