File tree 6 files changed +41
-0
lines changed
6 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 5
5
- Added ` customJs ` option to include a script tag in generated HTML output, #2650 .
6
6
- Added ` markdownLinkExternal ` option to treat ` http[s]:// ` links in markdown documents and comments as external to be opened in a new tab, #2679 .
7
7
- Added ` navigation.excludeReferences ` option to prevent re-exports from appearing in the left hand navigation, #2685 .
8
+ - Added support for the ` @abstract ` tag, #2692 .
8
9
9
10
### Bug Fixes
10
11
17
18
### Thanks!
18
19
19
20
- @Aryakoste
21
+ - @waynemwashuma
20
22
21
23
## v0.26.6 (2024-08-18)
22
24
Original file line number Diff line number Diff line change @@ -192,6 +192,15 @@ export class CommentPlugin extends ConverterComponent {
192
192
comment . removeModifier ( "@interface" ) ;
193
193
}
194
194
195
+ if ( comment . hasModifier ( "@abstract" ) ) {
196
+ if ( reflection . kindOf ( ReflectionKind . SomeSignature ) ) {
197
+ reflection . parent ! . setFlag ( ReflectionFlag . Abstract ) ;
198
+ } else {
199
+ reflection . setFlag ( ReflectionFlag . Abstract ) ;
200
+ }
201
+ comment . removeModifier ( "@abstract" ) ;
202
+ }
203
+
195
204
if ( comment . hasModifier ( "@private" ) ) {
196
205
reflection . setFlag ( ReflectionFlag . Private ) ;
197
206
if ( reflection . kindOf ( ReflectionKind . CallSignature ) ) {
Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ export const tsdocModifierTags = [
64
64
65
65
export const modifierTags = [
66
66
...tsdocModifierTags ,
67
+ "@abstract" ,
67
68
"@class" ,
68
69
"@enum" ,
69
70
"@event" ,
Original file line number Diff line number Diff line change
1
+ export abstract class Foo {
2
+ abstract foo ( ) : void ;
3
+
4
+ abstract x : number ;
5
+ }
6
+
7
+ /** @abstract */
8
+ export class Bar {
9
+ /** @abstract */
10
+ foo ( ) { }
11
+
12
+ /** @abstract */
13
+ x ! : number ;
14
+ }
Original file line number Diff line number Diff line change @@ -1708,6 +1708,17 @@ describe("Issue Tests", () => {
1708
1708
equal ( data2 . comment , undefined ) ;
1709
1709
} ) ;
1710
1710
1711
+ it ( "#2693 handles the @abstract tag" , ( ) => {
1712
+ const project = convert ( ) ;
1713
+ ok ( query ( project , "Foo.foo" ) . flags . isAbstract ) ;
1714
+ ok ( ! querySig ( project , "Foo.foo" ) . flags . isAbstract ) ;
1715
+ ok ( query ( project , "Foo.x" ) . flags . isAbstract ) ;
1716
+
1717
+ ok ( query ( project , "Bar.foo" ) . flags . isAbstract ) ;
1718
+ ok ( ! querySig ( project , "Bar.foo" ) . flags . isAbstract ) ;
1719
+ ok ( query ( project , "Bar.x" ) . flags . isAbstract ) ;
1720
+ } ) ;
1721
+
1711
1722
it ( "#2698 handles this parameters present in type but not node" , ( ) => {
1712
1723
const project = convert ( ) ;
1713
1724
const animator = querySig ( project , "animator" ) ;
Original file line number Diff line number Diff line change 67
67
"tagName" : " @class" ,
68
68
"syntaxKind" : " modifier"
69
69
},
70
+ {
71
+ "tagName" : " @abstract" ,
72
+ "syntaxKind" : " modifier"
73
+ },
70
74
{
71
75
"tagName" : " @document" ,
72
76
"syntaxKind" : " block"
You can’t perform that action at this time.
0 commit comments