Skip to main content

Interface: QueryDefinition<Ret, Args, Name>

common.QueryDefinition

An interface representing a Workflow query definition as returned from defineQuery

Remarks

Args and Ret can be used for parameter type inference in handler functions and WorkflowHandle methods. Name can optionally be specified with a string literal type to preserve type-level knowledge of the query name.

Type parameters

NameType
RetRet
Argsextends any[] = []
Nameextends string = string

Properties

[argsBrand]

[argsBrand]: Args

Virtual type brand to maintain a distinction between QueryDefinition types with different args. This field is not present at run-time.


[retBrand]

[retBrand]: Ret

Virtual type brand to maintain a distinction between QueryDefinition types with different return types. This field is not present at run-time.


name

name: Name


type

type: "query"