interface FileConfigProviderOptions<T = unknown> {
    schema?: ConfigSchema<T>;
    cache?: boolean;
    cacheTTL?: number;
    prefix?: string;
    watch?: boolean;
    transformers?: Record<string, (value: string) => unknown>;
    files: string[];
    optional?: boolean;
}

Type Parameters

  • T = unknown

Hierarchy

  • ConfigProviderOptions<T>
    • FileConfigProviderOptions

Properties

schema?: ConfigSchema<T>

Validation schema (optional)

cache?: boolean

Cache configuration values

true
cacheTTL?: number

Cache TTL in milliseconds

undefined (no expiration)
prefix?: string

Prefix for all keys

watch?: boolean

Enable hot reload (if supported)

false
transformers?: Record<string, (value: string) => unknown>

Transformation functions for specific keys

{
transformers: {
'port': (value) => parseInt(value, 10),
'timeout': (value) => parseInt(value, 10),
}
}
files: string[]

Array of file paths to load (in order of priority) Later files override earlier ones

optional?: boolean

Skip files that don't exist instead of throwing error

false