File tree Expand file tree Collapse file tree 6 files changed +20
-5
lines changed Expand file tree Collapse file tree 6 files changed +20
-5
lines changed Original file line number Diff line number Diff line change 6
6
- Fixed ` --validation.notDocumented ` warnings for functions/methods, #1895 .
7
7
- Search results will no longer include random items when the search bar is empty, #1881 .
8
8
- Comments on overloaded constructors will now be detected in the same way that overloaded functions/methods are.
9
+ - Fixed ` removeReflection ` not completely removing reflections from the project.
9
10
10
11
### Thanks!
11
12
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ export class ContainerReflection extends Reflection {
39
39
* @param callback The callback function that should be applied for each child reflection.
40
40
*/
41
41
override traverse ( callback : TraverseCallback ) {
42
- for ( const child of this . children ?? [ ] ) {
42
+ for ( const child of this . children ?. slice ( ) || [ ] ) {
43
43
if ( callback ( child , TraverseProperty . Children ) === false ) {
44
44
return ;
45
45
}
Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ export class DeclarationReflection extends ContainerReflection {
170
170
* @param callback The callback function that should be applied for each child reflection.
171
171
*/
172
172
override traverse ( callback : TraverseCallback ) {
173
- for ( const parameter of this . typeParameters ?? [ ] ) {
173
+ for ( const parameter of this . typeParameters ?. slice ( ) || [ ] ) {
174
174
if ( callback ( parameter , TraverseProperty . TypeParameter ) === false ) {
175
175
return ;
176
176
}
@@ -187,7 +187,7 @@ export class DeclarationReflection extends ContainerReflection {
187
187
}
188
188
}
189
189
190
- for ( const signature of this . signatures ?? [ ] ) {
190
+ for ( const signature of this . signatures ?. slice ( ) || [ ] ) {
191
191
if ( callback ( signature , TraverseProperty . Signatures ) === false ) {
192
192
return ;
193
193
}
Original file line number Diff line number Diff line change @@ -73,13 +73,13 @@ export class SignatureReflection extends Reflection {
73
73
}
74
74
}
75
75
76
- for ( const parameter of this . typeParameters ?? [ ] ) {
76
+ for ( const parameter of this . typeParameters ?. slice ( ) || [ ] ) {
77
77
if ( callback ( parameter , TraverseProperty . TypeParameter ) === false ) {
78
78
return ;
79
79
}
80
80
}
81
81
82
- for ( const parameter of this . parameters ?? [ ] ) {
82
+ for ( const parameter of this . parameters ?. slice ( ) || [ ] ) {
83
83
if ( callback ( parameter , TraverseProperty . Parameters ) === false ) {
84
84
return ;
85
85
}
Original file line number Diff line number Diff line change @@ -70,4 +70,13 @@ export const behaviorTests: Record<
70
70
71
71
equal ( foo . comment , undefined ) ;
72
72
} ,
73
+
74
+ removeReflection ( project ) {
75
+ const foo = query ( project , "foo" ) ;
76
+ project . removeReflection ( foo ) ;
77
+ equal (
78
+ Object . values ( project . reflections ) . map ( ( r ) => r . name ) ,
79
+ [ "typedoc" ]
80
+ ) ;
81
+ } ,
73
82
} ;
Original file line number Diff line number Diff line change
1
+ export function foo ( first : string , second : string , third : string ) {
2
+ first ;
3
+ second ;
4
+ third ;
5
+ }
You can’t perform that action at this time.
0 commit comments