Skip to content

Type Alias: Formula<ParamDefsT, ResultT, SchemaT>

Formula<ParamDefsT, ResultT, SchemaT> = ResultT extends String ? StringPackFormula<ParamDefsT> : ResultT extends Number ? NumericPackFormula<ParamDefsT> : ResultT extends Boolean ? BooleanPackFormula<ParamDefsT> : ResultT extends Array ? ObjectPackFormula<ParamDefsT, ArraySchema<SchemaT>> : ObjectPackFormula<ParamDefsT, SchemaT>

Defined in: api.ts:1066

A pack formula, complete with metadata about the formula like its name, description, and parameters, as well as the implementation of that formula.

This is the type for an actual user-facing formula, rather than other formula-shaped resources within a pack, like an autocomplete metadata formula or a sync getter formula.

Type Parameters

Type Parameter Default type
ParamDefsT extends ParamDefs ParamDefs
ResultT extends ValueType ValueType
SchemaT extends Schema Schema