We were "faking" a TypeSet as part of the return type of e.shape to allow using $infer on e.shape expressions, but it turns out that caused the recent change to allow setting properties on a shape to a TypeSet as long as it agrees with the cardinality of the pointer to break.
There are some lingering issues here that we should clean up, such as making the cardinality of $infer<typeof someShape> something reasonable rather than trying to infer it from the shape since that will depend on it's actual usage. In practice, most people want the Cardinality.ONE version (so, without null and not an array) so perhaps we can change this in a break version in the future.
We were "faking" a
TypeSet
as part of the return type ofe.shape
to allow using$infer
one.shape
expressions, but it turns out that caused the recent change to allow setting properties on a shape to aTypeSet
as long as it agrees with the cardinality of the pointer to break.There are some lingering issues here that we should clean up, such as making the cardinality of
$infer<typeof someShape>
something reasonable rather than trying to infer it from the shape since that will depend on it's actual usage. In practice, most people want theCardinality.ONE
version (so, withoutnull
and not an array) so perhaps we can change this in a break version in the future.