@@ -89,9 +89,9 @@ function formatType(node, getHref) {
89
89
90
90
case Syntax . TypeApplication :
91
91
return formatType ( node . expression , getHref )
92
- . concat ( commaList ( getHref , node . applications , '. <' , '>' ) ) ;
92
+ . concat ( commaList ( getHref , node . applications , '<' , '>' ) ) ;
93
93
case Syntax . UnionType :
94
- return commaList ( getHref , node . elements , '(' , ')' , '| ' ) ;
94
+ return commaList ( getHref , node . elements , '(' , ')' , ' | ' ) ;
95
95
case Syntax . ArrayType :
96
96
return commaList ( getHref , node . elements , '[' , ']' ) ;
97
97
case Syntax . RecordType :
@@ -132,7 +132,7 @@ function formatType(node, getHref) {
132
132
// lets the expression be omitted.
133
133
return decorate ( formatType ( node . expression , getHref ) , '...' , true ) ;
134
134
case Syntax . OptionalType :
135
- return decorate ( formatType ( node . expression , getHref ) , '= ' ) . concat (
135
+ return decorate ( decorate ( formatType ( node . expression , getHref ) , '[' , true ) , '] ') . concat (
136
136
node . default ? t ( '(default ' + node . default + ')' ) : [ ] ) ;
137
137
case Syntax . NonNullableType :
138
138
return decorate ( formatType ( node . expression , getHref ) , '!' , node . prefix ) ;
0 commit comments