nestjs-http-promise/lib/interfaces/http-module.interface.ts
Conicaw 4ecbadfa4d
refactor: remove unused option
Remove unused option

commit-id:d8e8797e
2023-12-23 20:37:43 -06:00

24 lines
834 B
TypeScript

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