@wix/sdk-types
Advanced tools
Comparing version 1.7.1 to 1.7.2
@@ -79,6 +79,6 @@ type HostModule<T, H extends Host> = { | ||
isDomainEvent?: boolean; | ||
transformations?: unknown; | ||
transformations?: (envelope: unknown) => Payload; | ||
__payload: Payload; | ||
}; | ||
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>; | ||
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>; | ||
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>; | ||
@@ -85,0 +85,0 @@ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void; |
@@ -29,3 +29,3 @@ "use strict"; | ||
// src/event-handlers-modules.ts | ||
function EventDefinition(type, isDomainEvent = false, _transformations = {}) { | ||
function EventDefinition(type, isDomainEvent = false, transformations = (x) => x) { | ||
return () => ({ | ||
@@ -35,3 +35,3 @@ __type: "event-definition", | ||
isDomainEvent, | ||
transformations: _transformations | ||
transformations | ||
}); | ||
@@ -38,0 +38,0 @@ } |
{ | ||
"name": "@wix/sdk-types", | ||
"version": "1.7.1", | ||
"version": "1.7.2", | ||
"license": "UNLICENSED", | ||
@@ -60,3 +60,3 @@ "author": { | ||
}, | ||
"falconPackageHash": "1625d05bd31b4f3c4d050efc021096c2680fe38d4b6c6c0da9f479f1" | ||
"falconPackageHash": "090d1e823bbdc07dcb40409533d801ef3e87d89a7b97e8f1fd422674" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
12624