tink_hxx
tink_hxx copied to clipboard
Support dynamic spreads.
Especially when working with React passing dynamic props is desired, which is quite different from tink.Anon.merge that underpins hxx spreads. Syntax would be {...untyped <expr>}. Have to figure out what exactly to do regarding type checking. Probably should support a way to disallow it for specific tags (e.g. coconut views).
How about (top-down) typing the attributes without the dynamic spread first. Then just reuse that type for the post-spread object?
function dynamicSpread<T>(staticAttrs:T, dynamicAttrs:Any):T;