Skip to content

Instantly share code, notes, and snippets.

@Raynos
Created May 26, 2014 02:59
Show Gist options
  • Save Raynos/2d5165f41df294f90b0b to your computer and use it in GitHub Desktop.
Save Raynos/2d5165f41df294f90b0b to your computer and use it in GitHub Desktop.
type VNode := {
tagName: String,
(* properties has a set of well defined
optional properties.
However it also has wildcard keys like
'data-foo': Any
and onfoo: Function
*)
properties: Object<String, Any> & {
value?: String,
name?: String,
src?: String,
href?: String,
type?: String,
style: Object<String, String>,
min?: Number,
max?: Number,
className?: String,
id?: String,
rel?: String,
autofocus?: Boolean,
checked?: Boolean,
placeholder?: String,
htmlFor?: String,
innerHTML?: String,
width?: Number,
height?: Number,
disable?: Boolean,
key?: String,
target?: String
},
children: Array<VNode>,
key: String | undefined,
namespace: String | undefined
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment