This fixes a bug that occurs when using recursive and intersecting types with the noExtraProps flag at the same time. For example:
type BNode = {
node?: BNode;
}
type ANode = {
val: number;
} & BNode;
type CNode = {
val: string;
} & BNode;
type Tree = {
a: number;
$schema?: string;
} & (CNode | ANode);
The bug occurs because when iterating over the intersecting types, if one of the types is recursive it is returned as a ref, and this cannot be added to the type being built. The fix makes sure that in this case, a ref isnt returned
This fixes a bug that occurs when using recursive and intersecting types with the noExtraProps flag at the same time. For example:
The bug occurs because when iterating over the intersecting types, if one of the types is recursive it is returned as a ref, and this cannot be added to the type being built. The fix makes sure that in this case, a ref isnt returned