File tree Expand file tree Collapse file tree 4 files changed +14
-10
lines changed Expand file tree Collapse file tree 4 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -165,10 +165,14 @@ export function resolveType(
165165 return new IntrinsicNode ( 'undefined' ) ;
166166 }
167167
168- if ( type . flags & ts . TypeFlags . Any || type . flags & ts . TypeFlags . Unknown ) {
168+ if ( type . flags & ts . TypeFlags . Any ) {
169169 return new IntrinsicNode ( 'any' ) ;
170170 }
171171
172+ if ( type . flags & ts . TypeFlags . Unknown ) {
173+ return new IntrinsicNode ( 'unknown' ) ;
174+ }
175+
172176 if ( type . flags & ts . TypeFlags . Literal ) {
173177 if ( type . isLiteral ( ) ) {
174178 return new LiteralNode (
@@ -180,7 +184,7 @@ export function resolveType(
180184 }
181185
182186 if ( type . flags & ts . TypeFlags . Null ) {
183- return new LiteralNode ( 'null' ) ;
187+ return new IntrinsicNode ( 'null' ) ;
184188 }
185189
186190 // TODO: currently types can be either a "function" or an "object" but not both.
Original file line number Diff line number Diff line change 3434 {
3535 "name" : " nullLiteral" ,
3636 "type" : {
37- "kind" : " literal " ,
38- "value " : " null"
37+ "kind" : " intrinsic " ,
38+ "name " : " null"
3939 },
4040 "optional" : false
4141 }
Original file line number Diff line number Diff line change 7070 "type" : {
7171 "kind" : " union" ,
7272 "types" : [
73- {
74- "kind" : " literal" ,
75- "value" : " null"
76- },
7773 {
7874 "kind" : " reference" ,
7975 "name" : " RefCallback"
8278 "kind" : " reference" ,
8379 "name" : " RefObject"
8480 },
81+ {
82+ "kind" : " intrinsic" ,
83+ "name" : " null"
84+ },
8585 {
8686 "kind" : " intrinsic" ,
8787 "name" : " undefined"
Original file line number Diff line number Diff line change 3434 {
3535 "name" : " n" ,
3636 "type" : {
37- "kind" : " literal " ,
38- "value " : " null"
37+ "kind" : " intrinsic " ,
38+ "name " : " null"
3939 },
4040 "optional" : false
4141 }
You can’t perform that action at this time.
0 commit comments