feat: add util package for generating search indices (#8571)

This commit is contained in:
Suneet Tipirneni
2022-08-29 15:41:51 -04:00
committed by GitHub
parent 40324574eb
commit d5dcddd350
55 changed files with 384 additions and 93 deletions

View File

@@ -0,0 +1,13 @@
import type { DocCodeSpan } from '@microsoft/tsdoc';
import { type DocNodeJSON, node } from './CommentNode';
export interface DocCodeSpanJSON extends DocNodeJSON {
code: string;
}
export function codeSpan(codeSpan: DocCodeSpan): DocCodeSpanJSON {
return {
...node(codeSpan),
code: codeSpan.code,
};
}