type-keyword is used to define new types by combining existing types.
Examples of where it may be useful:
type StringArray = Array.<String>; var x : StringArray = []; x[1] = "hello"; x[2] = 17; //--> type errorA shorthand type (like
StringArray in the example) is like an interface - it can be used in type annotations and signatures, but cannot be instantiated like a class.
type NumberOrBool = (Number|boolan);(See also union types)
type FierceObject = !Object;
Defines a new type which is like an Object, but which are not allowed to be null. (See also nullability)
