@@ -89,9 +89,9 @@ function formatType(node, getHref) {
8989
9090 case Syntax . TypeApplication :
9191 return formatType ( node . expression , getHref )
92- . concat ( commaList ( getHref , node . applications , '. <' , '>' ) ) ;
92+ . concat ( commaList ( getHref , node . applications , '<' , '>' ) ) ;
9393 case Syntax . UnionType :
94- return commaList ( getHref , node . elements , '(' , ')' , '| ' ) ;
94+ return commaList ( getHref , node . elements , '(' , ')' , ' | ' ) ;
9595 case Syntax . ArrayType :
9696 return commaList ( getHref , node . elements , '[' , ']' ) ;
9797 case Syntax . RecordType :
@@ -132,7 +132,7 @@ function formatType(node, getHref) {
132132 // lets the expression be omitted.
133133 return decorate ( formatType ( node . expression , getHref ) , '...' , true ) ;
134134 case Syntax . OptionalType :
135- return decorate ( formatType ( node . expression , getHref ) , '= ' ) . concat (
135+ return decorate ( decorate ( formatType ( node . expression , getHref ) , '[' , true ) , '] ') . concat (
136136 node . default ? t ( '(default ' + node . default + ')' ) : [ ] ) ;
137137 case Syntax . NonNullableType :
138138 return decorate ( formatType ( node . expression , getHref ) , '!' , node . prefix ) ;
0 commit comments