@fgaudo/effect-tea - v0.7.2
    Preparing search index...

    Variable driveConst

    drive: <
        State,
        Model,
        Message,
        Command = never,
        R = never,
        A = unknown,
        E = never,
        RS = never,
        Flags = never,
    >(
        ...args: [
            program: Shape<
                State,
                Model,
                Message,
                Command,
                R,
                never,
                unknown,
                Flags,
            >,
            scenario: (driver: Driver<Model, Message>) => Effect<A, E, RS>,
            ...(
                [Flags] extends [never]
                    ? [
                        options?: DriveOptions<
                            NoInfer<Message>,
                            NoInfer<State>,
                            NoInfer<Command>,
                        >,
                    ]
                    : [
                        options: RunOptions<
                            NoInfer<Message>,
                            NoInfer<State>,
                            NoInfer<Command>,
                        > & Readonly<{ patience?: Input }> & FlagsOption<NoInfer<Flags>>,
                    ]
            )[],
        ],
    ) => Effect<A, E, RS | Exclude<R, Scope>> = ...

    Runs program with run, from its flags when it has them, its commands and subscriptions included, with a renderer that keeps only the latest frame, and runs scenario against that frame. Returns what scenario returns, then stops the program. A defect of the program fails it, and so does a wait that lasts longer than patience. As when the program runs, a message update rejects is ignored: a scenario checks what it expects to see.

    Type Declaration

      • <
            State,
            Model,
            Message,
            Command = never,
            R = never,
            A = unknown,
            E = never,
            RS = never,
            Flags = never,
        >(
            ...args: [
                program: Shape<
                    State,
                    Model,
                    Message,
                    Command,
                    R,
                    never,
                    unknown,
                    Flags,
                >,
                scenario: (driver: Driver<Model, Message>) => Effect<A, E, RS>,
                ...(
                    [Flags] extends [never]
                        ? [
                            options?: DriveOptions<
                                NoInfer<Message>,
                                NoInfer<State>,
                                NoInfer<Command>,
                            >,
                        ]
                        : [
                            options: RunOptions<
                                NoInfer<Message>,
                                NoInfer<State>,
                                NoInfer<Command>,
                            > & Readonly<{ patience?: Input }> & FlagsOption<NoInfer<Flags>>,
                        ]
                )[],
            ],
        ): Effect<A, E, RS | Exclude<R, Scope>>
      • Type Parameters

        • State
        • Model
        • Message
        • Command = never
        • R = never
        • A = unknown
        • E = never
        • RS = never
        • Flags = never

        Parameters

        • ...args: [
              program: Shape<State, Model, Message, Command, R, never, unknown, Flags>,
              scenario: (driver: Driver<Model, Message>) => Effect<A, E, RS>,
              ...(
                  [Flags] extends [never]
                      ? [
                          options?: DriveOptions<
                              NoInfer<Message>,
                              NoInfer<State>,
                              NoInfer<Command>,
                          >,
                      ]
                      : [
                          options: RunOptions<
                              NoInfer<Message>,
                              NoInfer<State>,
                              NoInfer<Command>,
                          > & Readonly<{ patience?: Input }> & FlagsOption<NoInfer<Flags>>,
                      ]
              )[],
          ]

        Returns Effect<A, E, RS | Exclude<R, Scope>>