@tanstack/db
Version:
A reactive client store for building super fast apps on sync
1 lines • 686 B
Source Map (JSON)
{"version":3,"file":"callbacks.cjs","sources":["../../../src/utils/callbacks.ts"],"sourcesContent":["/** Attempt every callback, then rethrow the first exact failure value. */\nexport function runAllCallbacks(callbacks: Iterable<() => void>): void {\n let firstFailure: { error: unknown } | undefined\n for (const callback of callbacks) {\n try {\n callback()\n } catch (error) {\n firstFailure ??= { error }\n }\n }\n if (firstFailure) throw firstFailure.error\n}\n"],"names":[],"mappings":";;AACO,SAAS,gBAAgB,WAAuC;AACrE,MAAI;AACJ,aAAW,YAAY,WAAW;AAChC,QAAI;AACF,eAAA;AAAA,IACF,SAAS,OAAO;AACd,uBAAiB,EAAE,MAAA;AAAA,IACrB;AAAA,EACF;AACA,MAAI,oBAAoB,aAAa;AACvC;;"}