doc: Internals IShorthandProp
This commit is contained in:
parent
ec287b9069
commit
0ccb9b2386
1 changed files with 10 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue