Skip to content

Commit

Permalink
Add @since to the default list of recognized tags
Browse files Browse the repository at this point in the history
Resolves #2614
  • Loading branch information
Gerrit0 committed Jun 25, 2024
1 parent e5ba1e8 commit 22fc83e
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Unreleased

### Features

- Added `@since` to the default list of recognized tags, #2614.

## v0.26.2 (2024-06-24)

### Features
Expand Down
3 changes: 2 additions & 1 deletion src/lib/utils/options/tsdoc-defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ export const blockTags = [
"@property",
"@return",
"@satisfies",
"@since",
"@template", // Alias for @typeParam
"@type", // Because TypeScript is important!
"@type",
"@typedef",
] as const;

Expand Down
4 changes: 4 additions & 0 deletions src/test/converter2/issues/gh2614.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* @since 1.0.0
*/
export function foo() {}
11 changes: 11 additions & 0 deletions src/test/issues.c2.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1625,4 +1625,15 @@ describe("Issue Tests", () => {
convert();
logger.expectNoOtherMessages();
});

it("#2614 supports @since tag", () => {
const project = convert();
const foo = querySig(project, "foo");
equal(
foo.comment?.getTag("@since"),
new CommentTag("@since", [{ kind: "text", text: "1.0.0" }]),
);

logger.expectNoOtherMessages();
});
});
4 changes: 4 additions & 0 deletions tsdoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@
"tagName": "@satisfies",
"syntaxKind": "block"
},
{
"tagName": "@since",
"syntaxKind": "block"
},
{
"tagName": "@license",
"syntaxKind": "block"
Expand Down

0 comments on commit 22fc83e

Please sign in to comment.