Class InSubmit<TValue>Abstract

Input submit aspect.

Allows to submit input data and reports submit status.

Implements an EventKeeper interface by sending submit status flags to registered receivers.

Type Parameters

  • TValue

    Input value type.

Hierarchy

  • InSubmit

Implements

Constructors

Properties

Accessors

Methods

Constructors

  • Type Parameters

    • TValue

    Returns InSubmit<TValue>

Properties

read: AfterEvent<[InSubmit.Flags]>

An AfterEvent keeper of submit status flags.

The [AfterEvent__symbol] property is an alias of this one.

Accessors

Methods

  • Attempts to submit the input data.

    1. Sets submitted status flag. 2.1. Rejects to submit if busy status flag is set, or if ready status flag is not set with [InSubmitRejectedError]. Note that the latter mey be reset after the step 1. So this check is performed asynchronously. 2.2. Otherwise, sets the busy status flag.
    2. Clears submit failure messages.
    3. Calls submitter function.
    4. Waits for the promise returned by submitter to resolve. 5.1. Resolves the result promise if submit were successful. 5.2. Otherwise, reports submit failure messages.
    5. Rejects the result promise.

    Type Parameters

    • TResult

      Submit result value type.

    Parameters

    • submitter: Submitter<TValue, TResult>

      A submitter function that performs actual submit.

    Returns Promise<TResult>

    Submit result promise.

Generated using TypeDoc