api / type
Operation
Union type for all operation types, determined by the value type.
Union type for all operation types, determined by the value type.
Signature
export type Operation<T> = T extends number
? NumberOperation
: T extends string | unknown[]
? StringAndArrayOperation
: GenericOperation;
Type Parameters
- The type of value the operation works with
Remarks
- Number values map to
NumberOperation - String or array values map to
StringAndArrayOperation - Other types map to
GenericOperation