feat(website): parse and show unstable tsdoc tag (#11187)

feat(website): parse and show unstable tsDoc tag
This commit is contained in:
Qjuh
2025-10-22 13:53:56 +02:00
committed by GitHub
parent 68835b3ff7
commit 697556fd16
8 changed files with 59 additions and 2 deletions

View File

@@ -413,6 +413,8 @@ function itemTsDoc(item: DocNode, apiItem: ApiItem) {
(block) => block.blockTag.tagNameWithUpperCase === StandardTags.defaultValue.tagNameWithUpperCase,
);
const unstableBlock = comment.customBlocks.find((block) => block.blockTag.tagNameWithUpperCase === '@UNSTABLE');
const mixesBlocks = comment.customBlocks.filter((block) => block.blockTag.tagNameWithUpperCase === '@MIXES');
return {
@@ -442,6 +444,11 @@ function itemTsDoc(item: DocNode, apiItem: ApiItem) {
.flat(1)
.filter((val: any) => val.kind !== DocNodeKind.SoftBreak)
: [],
unstableBlock: unstableBlock
? createNode(unstableBlock.content)
.flat(1)
.filter((val: any) => val.kind !== DocNodeKind.SoftBreak)
: [],
exampleBlocks: exampleBlocks
.flatMap((block) => createNode(block.content).flat(1))
.filter((val: any) => val.kind !== DocNodeKind.SoftBreak),