Theemo / @theemo/tokens / findConstrainedValue
Function: findConstrainedValue()
ts
function findConstrainedValue(value, constraints):
| ConstrainedValue<keyof TokenTypeRegistry>
| undefined;
Defined in: packages/tokens/src/token-values.ts:12
Finds the value matching the provided constraints
Parameters
Parameter | Type | Description |
---|---|---|
value | unknown | the Token value |
constraints | Constraints | the constraints for lookup |
Returns
| ConstrainedValue
<keyof TokenTypeRegistry
> | undefined
the matched token value or nothing