Skip to content

Commit 22fc83e

Browse files
committed
Add @since to the default list of recognized tags
Resolves #2614
1 parent e5ba1e8 commit 22fc83e

File tree

5 files changed

+25
-1
lines changed

5 files changed

+25
-1
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Unreleased
22

3+
### Features
4+
5+
- Added `@since` to the default list of recognized tags, #2614.
6+
37
## v0.26.2 (2024-06-24)
48

59
### Features

src/lib/utils/options/tsdoc-defaults.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ export const blockTags = [
3232
"@property",
3333
"@return",
3434
"@satisfies",
35+
"@since",
3536
"@template", // Alias for @typeParam
36-
"@type", // Because TypeScript is important!
37+
"@type",
3738
"@typedef",
3839
] as const;
3940

src/test/converter2/issues/gh2614.ts

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/**
2+
* @since 1.0.0
3+
*/
4+
export function foo() {}

src/test/issues.c2.test.ts

+11
Original file line numberDiff line numberDiff line change
@@ -1625,4 +1625,15 @@ describe("Issue Tests", () => {
16251625
convert();
16261626
logger.expectNoOtherMessages();
16271627
});
1628+
1629+
it("#2614 supports @since tag", () => {
1630+
const project = convert();
1631+
const foo = querySig(project, "foo");
1632+
equal(
1633+
foo.comment?.getTag("@since"),
1634+
new CommentTag("@since", [{ kind: "text", text: "1.0.0" }]),
1635+
);
1636+
1637+
logger.expectNoOtherMessages();
1638+
});
16281639
});

tsdoc.json

+4
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@
115115
"tagName": "@satisfies",
116116
"syntaxKind": "block"
117117
},
118+
{
119+
"tagName": "@since",
120+
"syntaxKind": "block"
121+
},
118122
{
119123
"tagName": "@license",
120124
"syntaxKind": "block"

0 commit comments

Comments
 (0)