UNPKG

@schemeless/event-store-react-native

Version:

React Native compatible build of the [`@schemeless/event-store`](../event-store) runtime. It mirrors the Node.js implementation but swaps the internal queue implementation to [`react-native-better-queue`](https://github.com/YahyaASadiq/react-native-better

5 lines (4 loc) 587 B
import type { BaseEventInput, CreatedEvent, EventFlow } from '@schemeless/event-store-types'; import { makeMainQueue } from './makeMainQueue'; import { SuccessEventObserver } from '@schemeless/event-store-types'; export declare const makeReceive: (mainQueue: ReturnType<typeof makeMainQueue>, successEventObservers?: SuccessEventObserver<any>[]) => <PartialPayload, Payload extends PartialPayload>(eventFlow: EventFlow<PartialPayload, Payload>) => (eventInput: BaseEventInput<PartialPayload, undefined>) => Promise<[CreatedEvent<Payload, undefined>, ...CreatedEvent<any, undefined>[]]>;