Type Alias Send<D>

Send<D>: ((event: Sendable<D, TransitionEvent<D, "$schema" extends keyof D
    ? "events" extends keyof D[keyof D & "$schema"]
        ? D[keyof D & "$schema"][keyof D[(...) & (...)] & "events"] extends undefined
            ? {}
            : D[keyof D & "$schema"][keyof D[(...) & (...)] & "events"]
        : {}
    : {}>, "type" extends keyof ValueOf<{
        [T in string | number | symbol]: IsStringLiteral<T> extends false
            ? never
            : T extends ReservedKeyword
                ? never
                : Extends<(...), (...)> extends false
                    ? never
                    : (...) & (...)
    }> & keyof (("$schema" extends keyof D
            ? "strict" extends keyof D[(...) & (...)]
                ? (...)[(...)][(...) & (...)] extends undefined
                    ? undefined
                    : (...)[(...)][(...) & (...)]
                : undefined
            : undefined) extends true
        ? never
        : _TransitionEvent<Exclude<ValueOf<{
            [V in (...)]: (...)
        }>, ReservedKeyword | keyof (...)> | Exclude<keyof ((...) extends (...)
            ? (...)
            : (...)), ReservedKeyword | keyof (...)>>)
    ? TransitionEvent<D, "$schema" extends keyof D
            ? "events" extends keyof D[(...) & (...)]
                ? (...)[(...)][(...) & (...)] extends undefined
                    ? {}
                    : (...)[(...)][(...) & (...)]
                : {}
            : {}>["type"] extends undefined
        ? undefined
        : TransitionEvent<D, "$schema" extends keyof D
            ? "events" extends keyof D[(...) & (...)]
                ? (...)[(...)][(...) & (...)] extends undefined
                    ? {}
                    : (...)[(...)][(...) & (...)]
                : {}
            : {}>["type"]
    : undefined>) => void)

The type of the send function to send an event to the state machine.

Type Parameters

  • D

    The type of the state machine definition.

Type declaration

    • (event): void
    • Sends an event to the state machine.

      Parameters

      • event: Sendable<D, TransitionEvent<D, "$schema" extends keyof D
            ? "events" extends keyof D[keyof D & "$schema"]
                ? D[keyof D & "$schema"][keyof D[(...) & (...)] & "events"] extends undefined
                    ? {}
                    : D[keyof D & "$schema"][keyof D[(...) & (...)] & "events"]
                : {}
            : {}>, "type" extends keyof ValueOf<{
                [T in string | number | symbol]: IsStringLiteral<T> extends false
                    ? never
                    : T extends ReservedKeyword
                        ? never
                        : Extends<(...), (...)> extends false
                            ? never
                            : (...) & (...)
            }> & keyof (("$schema" extends keyof D
                    ? "strict" extends keyof D[(...) & (...)]
                        ? (...)[(...)][(...) & (...)] extends undefined
                            ? undefined
                            : (...)[(...)][(...) & (...)]
                        : undefined
                    : undefined) extends true
                ? never
                : _TransitionEvent<Exclude<ValueOf<{
                    [V in (...)]: (...)
                }>, ReservedKeyword | keyof (...)> | Exclude<keyof ((...) extends (...)
                    ? (...)
                    : (...)), ReservedKeyword | keyof (...)>>)
            ? TransitionEvent<D, "$schema" extends keyof D
                    ? "events" extends keyof D[(...) & (...)]
                        ? (...)[(...)][(...) & (...)] extends undefined
                            ? {}
                            : (...)[(...)][(...) & (...)]
                        : {}
                    : {}>["type"] extends undefined
                ? undefined
                : TransitionEvent<D, "$schema" extends keyof D
                    ? "events" extends keyof D[(...) & (...)]
                        ? (...)[(...)][(...) & (...)] extends undefined
                            ? {}
                            : (...)[(...)][(...) & (...)]
                        : {}
                    : {}>["type"]
            : undefined>

        The event to send to the state machine.

      Returns void