[{"data":1,"prerenderedAt":522},["ShallowReactive",2],{"navigation":3,"-api":65,"-api-surround":519},[4,15,29,47],{"title":5,"path":6,"stem":7,"children":8,"icon":10},"Omni Async","\u002Fguide","1.guide\u002F1.index",[9,11],{"title":5,"path":6,"stem":7,"icon":10},"i-lucide-book-open",{"title":12,"path":13,"stem":14,"icon":10},"Quick start","\u002Fguide\u002Fquick-start","1.guide\u002F2.quick-start",{"title":16,"path":17,"stem":18,"children":19},"Async state","\u002Fconcepts","2.concepts\u002F1.index",[20,21,25],{"title":16,"path":17,"stem":18},{"title":22,"path":23,"stem":24},"Concurrency and cancellation","\u002Fconcepts\u002Fconcurrency-and-cancellation","2.concepts\u002F2.concurrency-and-cancellation",{"title":26,"path":27,"stem":28},"Notifications and equality","\u002Fconcepts\u002Fnotifications","2.concepts\u002F3.notifications",{"title":30,"path":31,"stem":32,"children":33},"Framework adapters","\u002Fframeworks","3.frameworks\u002F1.index",[34,35,39,43],{"title":30,"path":31,"stem":32},{"title":36,"path":37,"stem":38},"React","\u002Fframeworks\u002Freact","3.frameworks\u002F2.react",{"title":40,"path":41,"stem":42},"Vue","\u002Fframeworks\u002Fvue","3.frameworks\u002F3.vue",{"title":44,"path":45,"stem":46},"Svelte","\u002Fframeworks\u002Fsvelte","3.frameworks\u002F4.svelte",{"title":48,"path":49,"stem":50,"children":51},"Core API","\u002Fapi","4.api\u002F1.index",[52,53,57,61],{"title":48,"path":49,"stem":50},{"title":54,"path":55,"stem":56},"React API","\u002Fapi\u002Freact","4.api\u002F2.react",{"title":58,"path":59,"stem":60},"Vue API","\u002Fapi\u002Fvue","4.api\u002F3.vue",{"title":62,"path":63,"stem":64},"Svelte API","\u002Fapi\u002Fsvelte","4.api\u002F4.svelte",{"id":66,"title":48,"body":67,"description":100,"extension":514,"meta":515,"navigation":516,"path":49,"seo":517,"stem":50,"__hash__":518},"content\u002F4.api\u002F1.index.md",{"type":68,"value":69,"toc":507},"minimark",[70,78,94,197,201,256,260,374,378,441,445,454,503],[71,72,74],"h2",{"id":73},"createasynchandler-options",[75,76,77],"code",{},"createAsync(handler, options?)",[79,80,81,82,85,86,89,90,93],"p",{},"Creates an ",[75,83,84],{},"AsyncOperation",". The handler receives an ",[75,87,88],{},"AsyncContext"," followed by the parameters passed to ",[75,91,92],{},"execute",".",[95,96,101],"pre",{"className":97,"code":98,"language":99,"meta":100,"style":100},"language-ts shiki shiki-themes github-light github-dark github-dark","const operation = createAsync(async ({ signal, requestId }, id: string) => loadUser(id, signal), {\n  concurrency: \"latest\",\n  abortable: true,\n});\n","ts","",[75,102,103,167,180,191],{"__ignoreMap":100},[104,105,108,112,116,119,123,127,130,133,137,140,143,146,149,152,155,158,161,164],"span",{"class":106,"line":107},"line",1,[104,109,111],{"class":110},"so5gQ","const",[104,113,115],{"class":114},"suiK_"," operation",[104,117,118],{"class":110}," =",[104,120,122],{"class":121},"shcOC"," createAsync",[104,124,126],{"class":125},"slsVL","(",[104,128,129],{"class":110},"async",[104,131,132],{"class":125}," ({ ",[104,134,136],{"class":135},"sQHwn","signal",[104,138,139],{"class":125},", ",[104,141,142],{"class":135},"requestId",[104,144,145],{"class":125}," }, ",[104,147,148],{"class":135},"id",[104,150,151],{"class":110},":",[104,153,154],{"class":114}," string",[104,156,157],{"class":125},") ",[104,159,160],{"class":110},"=>",[104,162,163],{"class":121}," loadUser",[104,165,166],{"class":125},"(id, signal), {\n",[104,168,170,173,177],{"class":106,"line":169},2,[104,171,172],{"class":125},"  concurrency: ",[104,174,176],{"class":175},"sfrk1","\"latest\"",[104,178,179],{"class":125},",\n",[104,181,183,186,189],{"class":106,"line":182},3,[104,184,185],{"class":125},"  abortable: ",[104,187,188],{"class":114},"true",[104,190,179],{"class":125},[104,192,194],{"class":106,"line":193},4,[104,195,196],{"class":125},"});\n",[71,198,200],{"id":199},"handler-context","Handler context",[202,203,204,220],"table",{},[205,206,207],"thead",{},[208,209,210,214,217],"tr",{},[211,212,213],"th",{},"Field",[211,215,216],{},"Type",[211,218,219],{},"Description",[221,222,223,242],"tbody",{},[208,224,225,230,235],{},[226,227,228],"td",{},[75,229,136],{},[226,231,232],{},[75,233,234],{},"AbortSignal | null",[226,236,237,238,241],{},"Present when ",[75,239,240],{},"abortable"," is enabled",[208,243,244,248,253],{},[226,245,246],{},[75,247,142],{},[226,249,250],{},[75,251,252],{},"number",[226,254,255],{},"Monotonically increasing operation-local request identifier",[71,257,259],{"id":258},"options","Options",[202,261,262,274],{},[205,263,264],{},[208,265,266,269,272],{},[211,267,268],{},"Option",[211,270,271],{},"Default",[211,273,219],{},[221,275,276,291,304,319,336,349,362],{},[208,277,278,283,288],{},[226,279,280],{},[75,281,282],{},"initialData",[226,284,285],{},[75,286,287],{},"null",[226,289,290],{},"Data used for the initial and reset snapshots",[208,292,293,298,301],{},[226,294,295],{},[75,296,297],{},"dataOnError",[226,299,300],{},"Preserve data",[226,302,303],{},"Produces replacement data after a rejection",[208,305,306,311,316],{},[226,307,308],{},[75,309,310],{},"concurrency",[226,312,313],{},[75,314,315],{},"\"all\"",[226,317,318],{},"Selects all-request or latest-request state updates",[208,320,321,325,330],{},[226,322,323],{},[75,324,240],{},[226,326,327],{},[75,328,329],{},"false",[226,331,81,332,335],{},[75,333,334],{},"AbortController"," for every execution",[208,337,338,343,346],{},[226,339,340],{},[75,341,342],{},"isEqual",[226,344,345],{},"All fields",[226,347,348],{},"Determines whether a new snapshot is ignored",[208,350,351,356,359],{},[226,352,353],{},[75,354,355],{},"onSuccess",[226,357,358],{},"—",[226,360,361],{},"Runs after an accepted successful state update",[208,363,364,369,371],{},[226,365,366],{},[75,367,368],{},"onError",[226,370,358],{},[226,372,373],{},"Runs after an accepted error state update",[71,375,377],{"id":376},"operation","Operation",[202,379,380,389],{},[205,381,382],{},[208,383,384,387],{},[211,385,386],{},"Method",[211,388,219],{},[221,390,391,401,411,421,431],{},[208,392,393,398],{},[226,394,395],{},[75,396,397],{},"getSnapshot()",[226,399,400],{},"Returns the current frozen snapshot",[208,402,403,408],{},[226,404,405],{},[75,406,407],{},"subscribe(listener)",[226,409,410],{},"Subscribes to accepted snapshot changes and returns an unsubscribe function",[208,412,413,418],{},[226,414,415],{},[75,416,417],{},"execute(...params)",[226,419,420],{},"Starts the handler and returns its promise",[208,422,423,428],{},[226,424,425],{},[75,426,427],{},"abort()",[226,429,430],{},"Aborts controllers, invalidates active work, and returns to idle",[208,432,433,438],{},[226,434,435],{},[75,436,437],{},"reset()",[226,439,440],{},"Invalidates active work and restores initial state",[71,442,444],{"id":443},"error-behavior","Error behavior",[79,446,447,450,451,453],{},[75,448,449],{},"execute()"," does not consume errors. It updates the snapshot and invokes ",[75,452,368],{},", then rejects with the original error so the caller decides how to handle it.",[95,455,457],{"className":97,"code":456,"language":99,"meta":100,"style":100},"try {\n  await operation.execute();\n} catch (error) {\n  \u002F\u002F Handle the same rejection stored in operation.getSnapshot().error.\n}\n",[75,458,459,467,480,491,497],{"__ignoreMap":100},[104,460,461,464],{"class":106,"line":107},[104,462,463],{"class":110},"try",[104,465,466],{"class":125}," {\n",[104,468,469,472,475,477],{"class":106,"line":169},[104,470,471],{"class":110},"  await",[104,473,474],{"class":125}," operation.",[104,476,92],{"class":121},[104,478,479],{"class":125},"();\n",[104,481,482,485,488],{"class":106,"line":182},[104,483,484],{"class":125},"} ",[104,486,487],{"class":110},"catch",[104,489,490],{"class":125}," (error) {\n",[104,492,493],{"class":106,"line":193},[104,494,496],{"class":495},"sCsY4","  \u002F\u002F Handle the same rejection stored in operation.getSnapshot().error.\n",[104,498,500],{"class":106,"line":499},5,[104,501,502],{"class":125},"}\n",[504,505,506],"style",{},"html pre.shiki code .so5gQ, html code.shiki .so5gQ{--shiki-light:#D73A49;--shiki-default:#F97583;--shiki-dark:#F97583}html pre.shiki code .suiK_, html code.shiki .suiK_{--shiki-light:#005CC5;--shiki-default:#79B8FF;--shiki-dark:#79B8FF}html pre.shiki code .shcOC, html code.shiki .shcOC{--shiki-light:#6F42C1;--shiki-default:#B392F0;--shiki-dark:#B392F0}html pre.shiki code .slsVL, html code.shiki .slsVL{--shiki-light:#24292E;--shiki-default:#E1E4E8;--shiki-dark:#E1E4E8}html pre.shiki code .sQHwn, html code.shiki .sQHwn{--shiki-light:#E36209;--shiki-default:#FFAB70;--shiki-dark:#FFAB70}html pre.shiki code .sfrk1, html code.shiki .sfrk1{--shiki-light:#032F62;--shiki-default:#9ECBFF;--shiki-dark:#9ECBFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":100,"searchDepth":169,"depth":169,"links":508},[509,510,511,512,513],{"id":73,"depth":169,"text":77},{"id":199,"depth":169,"text":200},{"id":258,"depth":169,"text":259},{"id":376,"depth":169,"text":377},{"id":443,"depth":169,"text":444},"md",{},{},{"title":48,"description":100},"H9e-mqb535KMojmGfLEBFBFk_SLQPOcFRdEzgD2MmBA",[520,521],{"title":44,"path":45,"stem":46,"description":100,"children":-1},{"title":54,"path":55,"stem":56,"description":100,"children":-1},1786006625353]