File tree Expand file tree Collapse file tree 4 files changed +17
-5
lines changed Expand file tree Collapse file tree 4 files changed +17
-5
lines changed Original file line number Diff line number Diff line change 12
12
13
13
## Bug Fixes
14
14
15
+ - Fixed crash when ` --excludeNotDocumented ` was used and the project contained a reference to a removed signature, #2496 .
15
16
- Fixed an issue where a namespace would not be created for merged function-namespaces which are declared as variables, #2478 .
16
17
- A class which implements itself will no longer cause a crash when rendering HTML, #2495 .
17
18
- Variable functions which have construct signatures will no longer be converted as functions, ignoring the construct signatures.
Original file line number Diff line number Diff line change @@ -236,17 +236,17 @@ export class ProjectReflection extends ContainerReflection {
236
236
this . reflectionChildren . delete ( reflection . id ) ;
237
237
238
238
// Remove references from the TS symbol to this reflection.
239
- const symbol = this . reflectionIdToSymbolMap . get ( reflection . id ) ;
240
- if ( symbol ) {
241
- const id = new ReflectionSymbolId ( symbol ) ;
242
- const saved = this . symbolToReflectionIdMap . get ( id ) ;
239
+ const symbolId = this . reflectionIdToSymbolIdMap . get ( reflection . id ) ;
240
+ if ( symbolId ) {
241
+ const saved = this . symbolToReflectionIdMap . get ( symbolId ) ;
243
242
if ( saved === reflection . id ) {
244
- this . symbolToReflectionIdMap . delete ( id ) ;
243
+ this . symbolToReflectionIdMap . delete ( symbolId ) ;
245
244
} else if ( typeof saved === "object" ) {
246
245
removeIfPresent ( saved , reflection . id ) ;
247
246
}
248
247
}
249
248
249
+ this . reflectionIdToSymbolMap . delete ( reflection . id ) ;
250
250
this . reflectionIdToSymbolIdMap . delete ( reflection . id ) ;
251
251
delete this . reflections [ reflection . id ] ;
252
252
}
Original file line number Diff line number Diff line change
1
+ export function f ( ) {
2
+ return 1 ;
3
+ }
4
+
5
+ /** doc */
6
+ export type ReturnOfF = ReturnType < typeof f > ;
Original file line number Diff line number Diff line change @@ -1383,4 +1383,9 @@ describe("Issue Tests", () => {
1383
1383
const context = theme . getRenderContext ( page ) ;
1384
1384
context . hierarchyTemplate ( page ) ;
1385
1385
} ) ;
1386
+
1387
+ it ( "Correctly cleans up references to functions #2496" , ( ) => {
1388
+ app . options . setValue ( "excludeNotDocumented" , true ) ;
1389
+ convert ( ) ;
1390
+ } ) ;
1386
1391
} ) ;
You can’t perform that action at this time.
0 commit comments