Skip to content

Theemo / @theemo/tokens / findConstrainedValue

Function: findConstrainedValue()

ts
function findConstrainedValue(value, constraints): TokenValue<TokenType> | void

Finds the value matching the provided constraints

Parameters

ParameterTypeDescription
valueunknownthe Token value
constraintsPartial<FeatureConstraints & ScopeConstraint>the constraints for lookup

Returns

TokenValue<TokenType> | void

the matched token value or nothing

Source

packages/@theemo/tokens/src/transforms/find-constrained-value.ts:12