UNPKG

@nestjs/config

Version:

Configuration for NestJS: load .env files and custom configuration, validate it at startup, and read it through an injectable ConfigService.

5 lines (4 loc) • 210 B
/** * @publicApi */ export type ConfigType<T extends (...args: any) => any> = T extends (...args: any) => infer ReturnVal ? ReturnVal extends Promise<infer AsyncReturnVal> ? AsyncReturnVal : ReturnVal : any;