@nestjs/config
Version:
Configuration for NestJS: load .env files and custom configuration, validate it at startup, and read it through an injectable ConfigService.
16 lines (15 loc) • 650 B
TypeScript
import type { StandardSchemaV1 } from '@standard-schema/spec';
/**
* Validates config using a Standard Schema (e.g. Zod, Arktype).
* @see https://standardschema.dev/
*/
export declare function validateWithStandardSchema(schema: StandardSchemaV1, config: Record<string, any>, options?: StandardSchemaV1.Options): Promise<{
error?: Error;
value: Record<string, any>;
}>;
/**
* Returns the names of the variables an object schema declares, or
* `undefined` if they can't be told from the schema (e.g. a Zod object
* wrapped in a "transform").
*/
export declare function getDeclaredKeys(schema: StandardSchemaV1): Set<string> | undefined;