For AI agents: the complete documentation index is available at /en/llms.txt, the full documentation bundle is available at /en/llms-full.txt, and this page is available as Markdown at /en/reference/sdk/sapi/runtime/functions/replaceOrRewind.md.
  • English
  • Function: replaceOrRewind()

    function replaceOrRewind(stack: string[], target: string): string[];

    Defined in: sapi/runtime/nav-stack.ts:13

    替换栈顶;目标已在栈中则回退到该页。

    Parameters

    ParameterType
    stackstring[]
    targetstring

    Returns

    string[]