Syntax Lookup
Enter some language construct you want to know more about.
This is the type coercion operator.
The :> operator may be used to convert a polymorphic variant to a string or int, or convert an object to a type with a subset of its fields.
Since ReScript 11.0.0 coercion also works for converting
from
inttofloatfrom record to record with the same field(s) or when record A is a subtype of record B
from
@unboxedvariant with only strings tostringfrom
stringto@unboxedvariant that have a catch-all unboxedstringcasefrom variant to variant when applicable
from variant to
string/int/floatwhen applicablefor invariant type arguments such as array payloads when the runtime representation is guaranteed to be exactly the same