import { DynamicModule , Module , Global } from '@nestjs/common' ; import { ConfigService , ConfigOptions } from './config.service' ; @ Global ( ) @ Module ( { } ) export class ConfigModule { param startPath deprecated static resolveSrcPath ( startPath ) { ConfigService . resolveSrcPath ( startPath ) ; return this ; } param path public static resolveRootPath ( path ) { ConfigService . resolveRootPath ( path ) ; return this ; } param glob param { ConfigOptions } options returns { DynamicModule } static load ( glob , options ? ) { const configProvider = { provide : ConfigService , useFactory : async ( ) : Promise < ConfigService > => { return ConfigService . load ( glob , options ) ; } , } ; return { module : ConfigModule , providers : [ configProvider ] , exports : [ configProvider ] , } ; } }