@acuris/eventstore-api
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -23,2 +23,3 @@ import { Observable } from "rxjs"; | ||
} | ||
export declare function useBatchWriter<T>(batchWriter: EventBatchWriter, block: (eventBatch: EventBatch) => Promise<T>): Promise<T>; | ||
export interface EventBatch { | ||
@@ -25,0 +26,0 @@ writeEvent(stream: StreamId, events: NewEvent[], expectedEventNumber?: number): Promise<void>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EmptyStreamEventNumber = void 0; | ||
exports.EmptyStreamEventNumber = exports.useBatchWriter = void 0; | ||
function useBatchWriter(batchWriter, block) { | ||
const writer = batchWriter.begin(); | ||
return block(writer).finally(() => writer.close()); | ||
} | ||
exports.useBatchWriter = useBatchWriter; | ||
exports.EmptyStreamEventNumber = -1; |
{ | ||
"name": "@acuris/eventstore-api", | ||
"private": false, | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "API for accessing event stores", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12593
263