Socket
Socket
Sign inDemoInstall

@arque/core

Package Overview
Dependencies
Maintainers
4
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arque/core - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

19

dist/libs/types.d.ts

@@ -17,4 +17,5 @@ /// <reference types="node" />

};
type ExtractEventType<T> = T extends Event<infer TType, unknown> ? TType : never;
export type EventHandler<TEvent extends Event = Event, TState = unknown> = {
type: TEvent['type'];
type: ExtractEventType<TEvent>;
handle(ctx: {

@@ -28,2 +29,8 @@ readonly aggregate: {

};
export type ProjectionEventHandler<TEvent extends Event = Event, TState = unknown> = {
type: ExtractEventType<TEvent>;
handle(ctx: {
readonly state: TState;
}, event: TEvent): void | Promise<void>;
};
export type Command<TType extends number = number, TArgs extends Array<unknown> = Array<unknown>> = {

@@ -34,4 +41,5 @@ type: TType;

export type GeneratedEvent<TEvent extends Event> = Pick<TEvent, 'type' | 'body'> & Partial<Pick<TEvent, 'meta'>>;
type ExtractCommandType<T> = T extends Command<infer TType, unknown[]> ? TType : never;
export type CommandHandler<TCommand extends Command = Command, TEvent extends Event = Event, TState = unknown> = {
type: TCommand['type'];
type: ExtractCommandType<TCommand>;
handle(ctx: {

@@ -45,7 +53,2 @@ readonly aggregate: {

};
export type ProjectionEventHandler<TEvent extends Event = Event, TState = unknown> = {
type: TEvent['type'];
handle(ctx: {
readonly state: TState;
}, event: TEvent): void | Promise<void>;
};
export {};
{
"name": "@arque/core",
"version": "0.2.1",
"version": "0.2.2",
"description": "`arque` core library",

@@ -34,3 +34,3 @@ "author": "ScaleForge",

},
"gitHead": "639987e593873721588b31f9d1550b6bcb14df12"
"gitHead": "47cbd0b684e2fa261e7ce7ac1c1bdc262c926406"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc