Skip to content
Compare
Choose a tag to compare
@github-actions github-actions released this 24 Dec 19:13
· 3 commits to main since this release
e754939

Patch Changes

  • #5139 bf6119a7310a878afbf4f5b01f5e24288f9a0f16 Thanks @SandroMaglione! - Make spawn input required when defined inside referenced actor:

    const childMachine = createMachine({
      types: { input: {} as { value: number } }
    });
    
    const machine = createMachine({
      types: {} as { context: { ref: ActorRefFrom<typeof childMachine> } },
      context: ({ spawn }) => ({
        ref: spawn(
          childMachine,
          // Input is now required!
          { input: { value: 42 } }
        )
      })
    });