@@ -7,14 +7,15 @@ import { usePluginData } from '@docusaurus/useGlobalData';
77import { useMinimalLayout } from '../hooks/useMinimalLayout' ;
88import type { TSDSignatureReflection } from '../types' ;
99import { ApiDataContext } from './ApiDataContext' ;
10- import { Comment , hasComment } from './Comment' ;
10+ import { Comment , displayPartsToMarkdown , hasComment } from './Comment' ;
1111import { CommentBadges , isCommentWithModifiers } from './CommentBadges' ;
1212import { DefaultValue } from './DefaultValue' ;
1313import { Flags } from './Flags' ;
1414import { hasSources , MemberSources } from './MemberSources' ;
1515import { Parameter } from './Parameter' ;
1616import { extractDeclarationFromType , Type } from './Type' ;
1717import { TypeParameters } from './TypeParameters' ;
18+ import { Markdown } from './Markdown' ;
1819
1920export function hasSigBody (
2021 sig : TSDSignatureReflection | undefined ,
@@ -62,6 +63,7 @@ export function MemberSignatureBody({ hideSources, sig }: MemberSignatureBodyPro
6263 const showTypes = sig . typeParameter && sig . typeParameter . length > 0 ;
6364 const showParams = ! minimal && sig . parameters && sig . parameters . length > 0 ;
6465 const showReturn = ! minimal && sig . type ;
66+ const showSince = sig . comment ?. blockTags ?. some ( ( tag ) => tag . tag === '@since' ) ;
6567
6668 const { reflections } = useContext ( ApiDataContext ) ;
6769 const { isPython } = usePluginData ( 'docusaurus-plugin-typedoc-api' ) as GlobalData ;
@@ -214,6 +216,16 @@ export function MemberSignatureBody({ hideSources, sig }: MemberSignatureBodyPro
214216 < Parameter param = { extractDeclarationFromType ( sig . type ) } />
215217 </ >
216218 ) }
219+
220+ {
221+ showSince && (
222+ < >
223+ < div className = "tsd-comment-since" >
224+ < Markdown content = { displayPartsToMarkdown ( sig . comment . blockTags ?. find ( ( tag ) => tag . tag === '@since' ) ?. content ) } />
225+ </ div >
226+ </ >
227+ )
228+ }
217229 </ >
218230 ) ;
219231}
0 commit comments