File tree Expand file tree Collapse file tree 5 files changed +18
-3
lines changed
Expand file tree Collapse file tree 5 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 2222 "jsdom" : " ^27.1.0" ,
2323 "lodash-es" : " ^4.17.21" ,
2424 "marked" : " ^16.4.2" ,
25+ "memoize" : " ^10.2.0" ,
2526 "nanoid" : " ^5.1.6" ,
2627 "new-github-issue-url" : " ^1.1.0" ,
2728 "pathe" : " ^2.0.3" ,
Original file line number Diff line number Diff line change 1+ import { expect , test } from "vitest" ;
2+ import { parseDocComment } from "./parse-doc-comment.ts" ;
3+
4+ test ( "parses doc comment" , ( ) => {
5+ expect ( parseDocComment ( "/** @internal */" ) . modifierTagSet . isInternal ( ) ) . toBe ( true ) ;
6+ } ) ;
Original file line number Diff line number Diff line change 1+ import { TSDocParser , type DocComment } from "@microsoft/tsdoc" ;
2+ import memoize from "memoize" ;
3+
4+ export const parseDocComment = memoize ( ( comment : string ) : DocComment => {
5+ const parser = new TSDocParser ( ) ;
6+ return parser . parseString ( comment ) . docComment ;
7+ } ) ;
Original file line number Diff line number Diff line change 3535 "jsdom" : " ^27.1.0" ,
3636 "lodash-es" : " ^4.17.21" ,
3737 "marked" : " ^16.4.2" ,
38+ "memoize" : " ^10.2.0" ,
3839 "nanoid" : " ^5.1.6" ,
3940 "new-github-issue-url" : " ^1.1.0" ,
4041 "pathe" : " ^2.0.3" ,
Original file line number Diff line number Diff line change 11---
2- import { parseDocComment } from " @jsdocs-io/extractor" ;
32import { StandardTags } from " @microsoft/tsdoc" ;
43import DocCommentInherit from " ./DocCommentInherit.astro" ;
54import DocNodeContainer from " ./DocNodeContainer.astro" ;
5+ import { parseDocComment } from " ../../lib/components/parse-doc-comment" ;
66
7- type Props = {
7+ interface Props {
88 doc: string ;
9- };
9+ }
1010
1111const { doc } = Astro .props ;
1212const {
You can’t perform that action at this time.
0 commit comments