Skip to content

Instantly share code, notes, and snippets.

@SandroMaglione
Created January 3, 2024 18:39
Show Gist options
  • Save SandroMaglione/f4b8082e57392439c9d3cf4a35c5800c to your computer and use it in GitHub Desktop.
Save SandroMaglione/f4b8082e57392439c9d3cf4a35c5800c to your computer and use it in GitHub Desktop.

Revisions

  1. SandroMaglione created this gist Jan 3, 2024.
    16 changes: 16 additions & 0 deletions machine.ts
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    import { setup } from "xstate";

    const machine = setup({
    types: {
    context: {} as {},
    events: {} as { readonly type: "event"; readonly params: {} },
    },
    actions: {},
    }).createMachine({
    id: "machine",
    context: {},
    initial: "Init",
    states: {
    Init: {},
    },
    });