For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /reference/sdk/node/config/functions/loadEnsuredConfig.md.
  • 简体中文
  • Function: loadEnsuredConfig()

    function loadEnsuredConfig<T>(
       root: string, 
       name: ConfigName, 
       schemaId: ConfigSchemaId, 
       defaults: T, 
       from?: "configs" | "packs" | "modules"): T;

    Defined in: node/config/index.ts:476

    ensure 后剥离元数据,返回可交给业务逻辑的纯配置(LSP:与无 $schema 的契约一致)。

    Type Parameters

    Type Parameter
    T extends Record<string, unknown>

    Parameters

    ParameterTypeDefault value
    rootstringundefined
    nameConfigNameundefined
    schemaIdConfigSchemaIdundefined
    defaultsTundefined
    from"configs" | "packs" | "modules""configs"

    Returns

    T