fynjs API
    Preparing search index...

    Interface XenvConfigSpecOption

    Spec for a single config key.

    interface XenvConfigSpecOption {
        default?: unknown;
        env?: string | boolean | string[];
        envMap?: Record<string, unknown>;
        post?: (value: unknown, trace: XenvConfigTrace) => unknown;
        type?: string;
        [extra: string]: unknown;
    }

    Indexable

    • [extra: string]: unknown
    Index
    default?: unknown

    default value, or a function that returns the default value

    env?: string | boolean | string[]

    env var name(s) to read the value from.

    • true: use the config key itself as the env var name
    • string: use this exact env var name
    • string[]: use the first env var name in the list that exists
    envMap?: Record<string, unknown>

    map raw env var string values to other values before further processing

    Optionalpost

    post?: (value: unknown, trace: XenvConfigTrace) => unknown

    transform the resolved value (and its trace) before it's placed in the result

    type?: string

    value type used to coerce a found value