@@ -604,7 +604,7 @@ const predicateConverter: TypeConverter<ts.TypePredicateNode, ts.Type> = {
604604
605605// This is a horrible thing... we're going to want to split this into converters
606606// for different types at some point.
607- const typeLiteralConverter : TypeConverter < ts . TypeLiteralNode > = {
607+ const typeLiteralConverter = {
608608 kind : [ ts . SyntaxKind . TypeLiteral ] ,
609609 convert ( context , node ) {
610610 const symbol = context . getSymbolAtLocation ( node ) ?? node . symbol ;
@@ -653,7 +653,6 @@ const typeLiteralConverter: TypeConverter<ts.TypeLiteralNode> = {
653653 return new ReflectionType ( reflection ) ;
654654 } ,
655655 convertType ( context , type ) {
656- // Don't use the third parameter here or you break convertTypeInline
657656 const symbol = type . getSymbol ( ) ;
658657 const reflection = new DeclarationReflection (
659658 "__type" ,
@@ -693,7 +692,7 @@ const typeLiteralConverter: TypeConverter<ts.TypeLiteralNode> = {
693692
694693 return new ReflectionType ( reflection ) ;
695694 } ,
696- } ;
695+ } satisfies TypeConverter < ts . TypeLiteralNode > ;
697696
698697const queryConverter : TypeConverter < ts . TypeQueryNode > = {
699698 kind : [ ts . SyntaxKind . TypeQuery ] ,
@@ -1267,11 +1266,8 @@ function convertTypeInlined(context: Context, type: ts.Type): SomeType {
12671266 return new ArrayType ( elementType ) ;
12681267 }
12691268
1270- // typeLiteralConverter doesn't use the node, so we can get away with lying here.
12711269 return typeLiteralConverter . convertType (
12721270 context ,
12731271 type ,
1274- null ! ,
1275- undefined ,
12761272 ) ;
12771273}
0 commit comments