UNPKG

envase

Version:

Type-safe environment variable validation with Standard Schema compliance

6 lines (5 loc) 463 B
import type { StandardSchemaV1 } from './standard-schema.ts'; import type { EnvSchema, EnvvarEntry, InferEnv, NodeEnvInfo } from './types.ts'; export declare const detectNodeEnv: (env: Record<string, string | undefined>) => NodeEnvInfo; export declare const envvar: <T extends StandardSchemaV1>(name: string, schema: T) => EnvvarEntry<T>; export declare const parseEnv: <T extends EnvSchema>(env: Record<string, string | undefined>, envSchema: T) => InferEnv<T>;