|
@@ -138,7 +138,10 @@ class Printer {
|
|
case TParent(ct): "(" + printComplexType(ct) + ")";
|
|
case TParent(ct): "(" + printComplexType(ct) + ")";
|
|
case TOptional(ct): "?" + printComplexType(ct);
|
|
case TOptional(ct): "?" + printComplexType(ct);
|
|
case TNamed(n, ct): n + ":" + printComplexType(ct);
|
|
case TNamed(n, ct): n + ":" + printComplexType(ct);
|
|
- case TExtend(tpl, fields): '{> ${tpl.map(printTypePath).join(" >, ")}, ${fields.map(printField).join(", ")} }';
|
|
|
|
|
|
+ case TExtend(tpl, fields):
|
|
|
|
+ var types = [for (t in tpl) "> " + printTypePath(t) + ", "].join("");
|
|
|
|
+ var fields = [for (f in fields) printField(f) + "; "].join("");
|
|
|
|
+ '{${types}${fields}}';
|
|
case TIntersection(tl): tl.map(printComplexType).join(" & ");
|
|
case TIntersection(tl): tl.map(printComplexType).join(" & ");
|
|
}
|
|
}
|
|
|
|
|