doc: Internals IShorthandProp

This commit is contained in:
Cole Lawrence 2022-04-20 11:21:27 -04:00
parent ec287b9069
commit 0ccb9b2386

View file

@ -17,8 +17,16 @@ export type IValidCompoundProps = {
[K in string]: PropTypeConfig [K in string]: PropTypeConfig
} }
// Question: Why doesn't this include Rgba? Should it include Marker? /**
// - Is this just for compound props? *
* This does not include Rgba since Rgba does not have a predictable
* object shape. We prefer to infer that compound props are described as
* `Record<string, IShorthandProp>` for now.
*
* In the future, it might be reasonable to wrap these types up into something
* which would allow us to differentiate between values at runtime
* (e.g. `val.type = "Rgba"` vs `val.type = "Compound"` etc)
*/
type IShorthandProp = type IShorthandProp =
| string | string
| number | number