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 {
302302 sb . push ( mode == Mode . EXPORT ? "<never>" : "<undefined>" ) ;
303303 }
304304 } 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 ) {
308310 sb . push ( mode == Mode . EXPORT ? "<never>" : "<undefined>" ) ;
309311 this . deferredTypings . push ( this . makeRecordType ( clazz , mode ) ) ;
310312 } else {
311- typeName = "__Internref" + clazz . id . toString ( ) ;
312- sb . push ( typeName ) ;
313313 this . deferredTypings . push ( this . makeInternrefType ( clazz ) ) ;
314314 }
315- seenObjectTypes . set ( clazz , typeName ) ;
316315 }
317316 }
318317 if ( type . is ( TypeFlags . NULLABLE ) ) {
You can’t perform that action at this time.
0 commit comments