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
In the following, the type spread is accepted, so the type definitions type checks.
However, there are errors when trying to use fields from x.
typex= {
x:int
}
typey= {
y: int,
...x,
}
letgetY= (v:y) =>v.y// error: This expression has type y The field x does not belong to type y// let getX = (v:y) => v.x//error: Some required record fields are missing:// let v:y = {y:3}// error: The field x does not belong to type y// let v:y = {y:3, x:4}
The text was updated successfully, but these errors were encountered:
In the following, the type spread is accepted, so the type definitions type checks.
However, there are errors when trying to use fields from
x
.The text was updated successfully, but these errors were encountered: