(getContext: () => Context.Context<R>)
| 706 | ] |
| 707 | |
| 708 | const makeResolvedAtomQueryInvalidator = <R>(getContext: () => Context.Context<R>): QueryInvalidator => { |
| 709 | let reactivity: Context.Service.Shape<typeof Reactivity.Reactivity> | undefined |
| 710 | const getReactivity = () => { |
| 711 | if (reactivity !== undefined) return reactivity |
| 712 | const service = Context.getOrUndefined(getContext(), Reactivity.Reactivity) |
| 713 | if (service === undefined) { |
| 714 | throw new Error("Reactivity service is missing from the client runtime") |
| 715 | } |
| 716 | return reactivity = service |
| 717 | } |
| 718 | |
| 719 | return { |
| 720 | invalidateAndAwait: (keys) => |
| 721 | invalidateAndAwait(keys).pipe( |
| 722 | Effect.provideService(Reactivity.Reactivity, getReactivity()) |
| 723 | ), |
| 724 | invalidateSoft: (keys) => |
| 725 | invalidateSoft(keys).pipe( |
| 726 | Effect.provideService(Reactivity.Reactivity, getReactivity()) |
| 727 | ) |
| 728 | } |
no test coverage detected
searching dependent graphs…