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,19 @@
import type { ApiItem, ApiModel } from '@microsoft/api-extractor-model';
import type { DocParamBlock } from '@microsoft/tsdoc';
import { block, type DocBlockJSON } from './CommentBlock';
interface DocParamBlockJSON extends DocBlockJSON {
name: string;
}
export function paramBlock(
paramBlock: DocParamBlock,
model: ApiModel,
version: string,
parentItem?: ApiItem,
): DocParamBlockJSON {
return {
...block(paramBlock, model, version, parentItem),
name: paramBlock.parameterName,
};
}