File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -302,17 +302,16 @@ export class TSDBuilder extends ExportsWalker {
302
302
sb . push ( mode == Mode . EXPORT ? "<never>" : "<undefined>" ) ;
303
303
}
304
304
} else {
305
- if ( this . isPlainObject ( clazz ) ) {
306
- typeName = "__Record" + clazz . id . toString ( ) ;
307
- sb . push ( typeName ) ;
305
+ let isPlain = this . isPlainObject ( clazz ) ;
306
+ typeName = `${ isPlain ? "__Record" : "__Internref" } ${ clazz . id } ` ;
307
+ sb . push ( typeName ) ;
308
+ seenObjectTypes . set ( clazz , typeName ) ;
309
+ if ( isPlain ) {
308
310
sb . push ( mode == Mode . EXPORT ? "<never>" : "<undefined>" ) ;
309
311
this . deferredTypings . push ( this . makeRecordType ( clazz , mode ) ) ;
310
312
} else {
311
- typeName = "__Internref" + clazz . id . toString ( ) ;
312
- sb . push ( typeName ) ;
313
313
this . deferredTypings . push ( this . makeInternrefType ( clazz ) ) ;
314
314
}
315
- seenObjectTypes . set ( clazz , typeName ) ;
316
315
}
317
316
}
318
317
if ( type . is ( TypeFlags . NULLABLE ) ) {
You can’t perform that action at this time.
0 commit comments