UNPKG

@tanstack/angular-query-experimental

Version:

Signals for managing, caching and syncing asynchronous and remote data in Angular

20 lines (19 loc) 508 B
import * as ng from "@angular/core"; import { InjectionToken, inject } from "@angular/core"; import { noop } from "@tanstack/query-core"; const PENDING_TASKS = new InjectionToken( "PENDING_TASKS", { factory: () => { const token = Reflect.get(ng, "PendingTasks"); const svc = token ? inject(token, { optional: true }) : null; return { add: svc ? () => svc.add() : () => noop }; } } ); export { PENDING_TASKS }; //# sourceMappingURL=pending-tasks-compat.mjs.map