UsedAs ¶
export type UsedAs<T> = T | StateObject<T>
Something which describes a value of type T
. When it is used in a
calculation, it becomes that value.
Recommended
Instead of using one of the more specific variants, your code should aim to use this type as often as possible. It allows your logic to deal with many representations of values at once,
Variants¶
T
- represents unchanging constant valuesStateObject<T>
- represents dynamically updating values