File tree Expand file tree Collapse file tree 4 files changed +21
-0
lines changed Expand file tree Collapse file tree 4 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ title: Changelog
15
15
The ` chevronSmall ` helper is now deprecated and will be removed with v0.29.0.
16
16
- Classes/interfaces marked with ` @hidden ` will no longer appear in the
17
17
"Hierarchy" section of the docs.
18
+ - TypeDoc now handles wildcard JSDoc types, #2949 .
18
19
19
20
### Thanks!
20
21
Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ export function loadConverters() {
93
93
// Only used if skipLibCheck: true
94
94
jsDocNullableTypeConverter ,
95
95
jsDocNonNullableTypeConverter ,
96
+ jsDocAllTypeConverter ,
96
97
]
97
98
) {
98
99
for ( const key of actor . kind ) {
@@ -1154,6 +1155,15 @@ const jsDocNonNullableTypeConverter: TypeConverter<ts.JSDocNonNullableType> = {
1154
1155
convertType : requestBugReport ,
1155
1156
} ;
1156
1157
1158
+ const jsDocAllTypeConverter : TypeConverter < ts . JSDocAllType > = {
1159
+ kind : [ ts . SyntaxKind . JSDocAllType ] ,
1160
+ convert ( ) {
1161
+ return new IntrinsicType ( "any" ) ;
1162
+ } ,
1163
+ // Should be a UnionType
1164
+ convertType : requestBugReport ,
1165
+ } ;
1166
+
1157
1167
function requestBugReport ( context : Context , nodeOrType : ts . Node | ts . Type ) {
1158
1168
if ( "kind" in nodeOrType ) {
1159
1169
const kindName = ts . SyntaxKind [ nodeOrType . kind ] ;
Original file line number Diff line number Diff line change
1
+ /**
2
+ * @callback Test
3
+ * @returns {Promise<*> }
4
+ */
5
+ export { } ;
Original file line number Diff line number Diff line change @@ -2128,4 +2128,9 @@ describe("Issue Tests", () => {
2128
2128
const project = convert ( ) ;
2129
2129
equal ( project . children ?. map ( c => c . name ) , [ "notExcluded" ] ) ;
2130
2130
} ) ;
2131
+
2132
+ it ( "#2949 handles JSDoc wildcard types" , ( ) => {
2133
+ const project = convert ( ) ;
2134
+ equal ( query ( project , "Test" ) . type ?. toString ( ) , "() => Promise<any>" ) ;
2135
+ } ) ;
2131
2136
} ) ;
You can’t perform that action at this time.
0 commit comments