Skip to content

variableRef

variableRef(name): VariableRefSpec

Defined in: extract/spec.ts:1141

Reference a bound variable from a ForEachSpec scope.

string

VariableRefSpec

variableRef('name') // the bound value itself
variableRef('item', ['address', 'city']) // navigate into bound value (positional)
variableRef('item', ['age'], 'number') // navigate + type check (positional)
variableRef('item', { path: ['age'], extract: 'number' }) // options object form
variableRef('x', { extract: 'string' }) // options without path

variableRef(name, options): VariableRefSpec

Defined in: extract/spec.ts:1142

Reference a bound variable from a ForEachSpec scope.

string

VariableRefOptions

VariableRefSpec

variableRef('name') // the bound value itself
variableRef('item', ['address', 'city']) // navigate into bound value (positional)
variableRef('item', ['age'], 'number') // navigate + type check (positional)
variableRef('item', { path: ['age'], extract: 'number' }) // options object form
variableRef('x', { extract: 'string' }) // options without path

variableRef(name, path, extract?): VariableRefSpec

Defined in: extract/spec.ts:1146

Reference a bound variable from a ForEachSpec scope.

string

readonly (string | number)[]

string

VariableRefSpec

variableRef('name') // the bound value itself
variableRef('item', ['address', 'city']) // navigate into bound value (positional)
variableRef('item', ['age'], 'number') // navigate + type check (positional)
variableRef('item', { path: ['age'], extract: 'number' }) // options object form
variableRef('x', { extract: 'string' }) // options without path