⚠️ Internal: This API is not publically exported by the package.

Class Command<TResult, TData>

Command offers default (de)serialization and the exec method to all commands.

TData represents what the user will enter or receive, TResult is the raw data returned from upstash, which may need to be transformed or parsed.

Type Parameters

  • TResult

  • TData

Hierarchy

Constructors

Methods

Properties

Constructors

  • Create a new command instance.

    You can define a custom deserialize function. By default we try to deserialize as json.

    Type Parameters

    • TResult

    • TData

    Parameters

    Returns Command<TResult, TData>

Methods

Properties

command: (string | number | boolean)[]
deserialize: Deserialize<TResult, TData>
serialize: Serialize