@actor-system/spawn-protocol
Advanced tools
+2
-2
@@ -7,4 +7,4 @@ import { receive, same } from '@actor-system/behaviors'; | ||
| return same; | ||
| const { behavior, name, replyTo } = msg; | ||
| const actorRef = context.spawn(behavior, name); | ||
| const { behavior, name, replyTo, props } = msg; | ||
| const actorRef = context.spawn(behavior, name, props); | ||
| replyTo.tell(actorRef); | ||
@@ -11,0 +11,0 @@ return same; |
@@ -12,3 +12,3 @@ import { Props, behavior, ActorRef } from '@actor-system/core'; | ||
| declare const $spawn: "spawn"; | ||
| declare const spawn: <T>({ name, props, replyTo, behavior, }: Letter.ExcludeLabel<Spawn<T>>) => Spawn<T>; | ||
| declare const spawn: <T>(behavior: behavior.Behavior<T>, name?: string, props?: Props) => (replyTo: ActorRef<ActorRef<T>>) => Spawn<T>; | ||
| declare const isSpawn: <T>(value: unknown) => value is Spawn<T>; | ||
@@ -15,0 +15,0 @@ declare const isCommand: <T>(value: unknown) => value is Command<T>; |
@@ -12,3 +12,3 @@ import { Props, behavior, ActorRef } from '@actor-system/core/internal'; | ||
| declare const $spawn: "spawn"; | ||
| declare const spawn: <T>({ name, props, replyTo, behavior, }: Letter.ExcludeLabel<Spawn<T>>) => Spawn<T>; | ||
| declare const spawn: <T>(behavior: behavior.Behavior<T>, name?: string, props?: Props) => (replyTo: ActorRef<ActorRef<T>>) => Spawn<T>; | ||
| declare const isSpawn: <T>(value: unknown) => value is Spawn<T>; | ||
@@ -15,0 +15,0 @@ declare const isCommand: <T>(value: unknown) => value is Command<T>; |
+1
-1
| import { letterGuard } from '@actor-system/mail'; | ||
| const $spawn = "spawn"; | ||
| const spawn = ({ name, props, replyTo, behavior, }) => ({ | ||
| const spawn = (behavior, name, props) => (replyTo) => ({ | ||
| name, | ||
@@ -6,0 +6,0 @@ props, |
+4
-4
| { | ||
| "name": "@actor-system/spawn-protocol", | ||
| "version": "0.1.0", | ||
| "version": "0.1.1", | ||
| "type": "module", | ||
@@ -41,8 +41,8 @@ "scripts": { | ||
| "dependencies": { | ||
| "@actor-system/behaviors": "0.1.0", | ||
| "@actor-system/core": "0.2.0", | ||
| "@actor-system/behaviors": "0.1.1", | ||
| "@actor-system/core": "0.2.1", | ||
| "@actor-system/mail": "0.0.3" | ||
| }, | ||
| "devDependencies": { | ||
| "@actor-system/testing": "0.1.0", | ||
| "@actor-system/testing": "0.1.1", | ||
| "@actor-system/shared": "0.0.3", | ||
@@ -49,0 +49,0 @@ "config": "^1.0.0" |
4639
1.6%+ Added
+ Added
- Removed
- Removed
Updated