(props: T)
| 178 | * into the `to` prop. |
| 179 | */ |
| 180 | export function inferTo<T extends object>(props: T): InferTo<T> { |
| 181 | const to = getForwardProps(props) |
| 182 | if (to) { |
| 183 | const out: any = { to } |
| 184 | eachProp(props, (val, key) => key in to || (out[key] = val)) |
| 185 | return out |
| 186 | } |
| 187 | return { ...props } as any |
| 188 | } |
| 189 | |
| 190 | // Compute the goal value, converting "red" to "rgba(255, 0, 0, 1)" in the process |
| 191 | export function computeGoal<T>(value: T | FluidValue<T>): T { |
no test coverage detected
searching dependent graphs…