@@ -604,7 +604,7 @@ const predicateConverter: TypeConverter<ts.TypePredicateNode, ts.Type> = {
604
604
605
605
// This is a horrible thing... we're going to want to split this into converters
606
606
// for different types at some point.
607
- const typeLiteralConverter : TypeConverter < ts . TypeLiteralNode > = {
607
+ const typeLiteralConverter = {
608
608
kind : [ ts . SyntaxKind . TypeLiteral ] ,
609
609
convert ( context , node ) {
610
610
const symbol = context . getSymbolAtLocation ( node ) ?? node . symbol ;
@@ -653,7 +653,6 @@ const typeLiteralConverter: TypeConverter<ts.TypeLiteralNode> = {
653
653
return new ReflectionType ( reflection ) ;
654
654
} ,
655
655
convertType ( context , type ) {
656
- // Don't use the third parameter here or you break convertTypeInline
657
656
const symbol = type . getSymbol ( ) ;
658
657
const reflection = new DeclarationReflection (
659
658
"__type" ,
@@ -693,7 +692,7 @@ const typeLiteralConverter: TypeConverter<ts.TypeLiteralNode> = {
693
692
694
693
return new ReflectionType ( reflection ) ;
695
694
} ,
696
- } ;
695
+ } satisfies TypeConverter < ts . TypeLiteralNode > ;
697
696
698
697
const queryConverter : TypeConverter < ts . TypeQueryNode > = {
699
698
kind : [ ts . SyntaxKind . TypeQuery ] ,
@@ -1267,11 +1266,8 @@ function convertTypeInlined(context: Context, type: ts.Type): SomeType {
1267
1266
return new ArrayType ( elementType ) ;
1268
1267
}
1269
1268
1270
- // typeLiteralConverter doesn't use the node, so we can get away with lying here.
1271
1269
return typeLiteralConverter . convertType (
1272
1270
context ,
1273
1271
type ,
1274
- null ! ,
1275
- undefined ,
1276
1272
) ;
1277
1273
}
0 commit comments