You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kazuho edited this page Jul 10, 2012
·
5 revisions
This page explains the types of JSX.
Primitive Types
boolean
number
string
(int)
Primitive types are non-nullable.
'Int' exists as a type, but would be equal to or slower than using 'number' in some cases (the definition of 'int' is: a number with fraction part == 0 (if it is not NaN nor Infinity), guaranteed to hold a 'number' without fractional part between -231 to 231-1).
Nullable primitive types
Nullable.<boolean>
Nullable.<number>
Nullable.<string>
(Nullable.<int>)
They are returned by [] operators of Array.<primitive_type> and Map.<primitive_type>.
Built-in Types
The types below are the built-in object types of JSX. Objects types are nullable.
Object
Array.<T>
Map.<T>
Boolean
Number
String
Function
JSX
Variant Type
variant
A variant can hold any type of data (including null). To use the data, explicit cast to other data types is necessary.
User-defined Types
Users may define a new class by extending the Object class, or by declaring an interface or a mixin. See Class, Interface, and Mixin.