(a: Iterable<T>)
| 256 | |
| 257 | const pub = "publishEvents" in args |
| 258 | ? args.publishEvents |
| 259 | : () => Effect.void |
| 260 | |
| 261 | type ChangeFeedHandler = (evt: ChangeFeedEvent<T>) => Effect.Effect<void> |
| 262 | const changeFeedByNamespace = yield* Ref.make(HashMap.empty<string, HashSet.HashSet<ChangeFeedHandler>>()) |
| 263 | const changeFeedWildcard = yield* Ref.make(HashSet.empty<ChangeFeedHandler>()) |
| 264 | // clear all handlers when the repository's scope closes |
| 265 | yield* Effect.addFinalizer(() => |
| 266 | Effect.all([ |