Documentation
    Preparing search index...

    Interface Options<Schema>

    Options for creating a Conf instance.

    interface Options<Schema extends StandardSchemaV1 = StandardSchemaV1> {
        accessPropertiesByDotNotation?: boolean;
        clearInvalidConfig?: boolean;
        configFileMode?: number;
        configName?: string;
        cwd?: string;
        deserialize?: Deserialize;
        fileExtension?: string;
        projectName?: string;
        projectSuffix?: string;
        schema?: Schema;
        serialize?: Serialize;
        watch?: boolean;
    }

    Type Parameters

    • Schema extends StandardSchemaV1 = StandardSchemaV1
    Index

    Properties

    accessPropertiesByDotNotation?: boolean

    Access nested properties using dot notation.

    true
    
    clearInvalidConfig?: boolean

    Reset to an empty config when the file is invalid.

    false
    
    configFileMode?: number

    File mode used when creating the config file.

    0o666
    
    configName?: string

    Config file name without extension.

    'config'
    
    cwd?: string

    Directory where the config file is stored. Overrides projectName.

    deserialize?: Deserialize

    Custom deserializer. Defaults to extended JSON via parse.

    fileExtension?: string

    Config file extension without a leading dot.

    'json'
    
    projectName?: string

    Project name used to resolve the default config directory. Required unless cwd is set.

    projectSuffix?: string

    Suffix appended to projectName in the config path.

    'nodejs'
    
    schema?: Schema

    Standard Schema used to validate the full config object.

    serialize?: Serialize

    Custom serializer. Defaults to extended JSON via stringify.

    watch?: boolean

    Watch the config file for external changes.

    false