Casts all items to a specific type.
// '1', '2', '3', '4'
Enumerable.create(1, 2, 3, 4)
.cast('string');
Supported types
Name(s) / value(s) | Description |
---|---|
(empty string) | No cast |
array, Array | array |
bool, boolean | boolean |
enumerable, seq, sequence | "Sequence" |
func, function | Function (wrapper) |
int, integer | (integer) number |
null | (null) |
number | number |
observable, Observable | Observable object |
ObservableArray, observableArray, observablearray | ObservableArray object |
str, string | String |