File tree 3 files changed +12
-3
lines changed
3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 5
5
- Added ` gitRevision:short ` placeholder option to ` --sourceLinkTemplate ` option, #2529 .
6
6
Links generated by TypeDoc will now default to using the non-short git revision.
7
7
8
+ ### Bug Fixes
9
+
10
+ - Fixed conversion of ` NoInfer ` missing type parameter reference, #2539 .
11
+
8
12
### Thanks!
9
13
10
14
- @xuhdev
Original file line number Diff line number Diff line change @@ -697,7 +697,7 @@ const queryConverter: TypeConverter<ts.TypeQueryNode> = {
697
697
698
698
const referenceConverter : TypeConverter <
699
699
ts . TypeReferenceNode ,
700
- ts . TypeReference | ts . StringMappingType
700
+ ts . TypeReference | ts . StringMappingType | ts . SubstitutionType
701
701
> = {
702
702
kind : [ ts . SyntaxKind . TypeReference ] ,
703
703
convert ( context , node ) {
@@ -747,7 +747,12 @@ const referenceConverter: TypeConverter<
747
747
context . resolveAliasedSymbol ( symbol ) ,
748
748
context ,
749
749
) ;
750
- if ( type . flags & ts . TypeFlags . StringMapping ) {
750
+ if ( type . flags & ts . TypeFlags . Substitution ) {
751
+ // NoInfer<T>
752
+ ref . typeArguments = [
753
+ convertType ( context , ( type as ts . SubstitutionType ) . baseType ) ,
754
+ ] ;
755
+ } else if ( type . flags & ts . TypeFlags . StringMapping ) {
751
756
ref . typeArguments = [
752
757
convertType ( context , ( type as ts . StringMappingType ) . type ) ,
753
758
] ;
Original file line number Diff line number Diff line change @@ -1177,6 +1177,6 @@ describe("Behavior Tests", () => {
1177
1177
const sig = querySig ( project , "createStreetLight" ) ;
1178
1178
equal ( sig . parameters ?. length , 2 ) ;
1179
1179
equal ( sig . parameters [ 0 ] . type ?. toString ( ) , "C[]" ) ;
1180
- equal ( sig . parameters [ 1 ] . type ?. toString ( ) , "NoInfer" ) ;
1180
+ equal ( sig . parameters [ 1 ] . type ?. toString ( ) , "NoInfer<C> " ) ;
1181
1181
} ) ;
1182
1182
} ) ;
You can’t perform that action at this time.
0 commit comments