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/sapi/service/functions/provide.md.
  • 简体中文
  • Function: provide()

    function provide(name: string, handler: ServiceHandler): () => void;

    Defined in: sapi/service/client.ts:62

    在 SAPI 进程内注册服务处理器。

    Parameters

    ParameterType
    namestring
    handlerServiceHandler

    Returns

    注销函数(cleanup 时调用)。

    () => void