@wc-toolkit/jsdoc-tags
Version:
A set of tools for retrieving and transforming data from the Custom Elements Manifest
40 lines (37 loc) • 1.26 kB
text/typescript
import { AnalyzePhaseParams } from '@custom-elements-manifest/analyzer';
/** Configuration for the CEM plugin */
type Options = {
tags?: CustomTag;
/** Show process logs */
debug?: boolean;
/** Prevents plugin from executing */
skip?: boolean;
};
/** Configuration for the individual tag */
type CustomTag = {
/** The name of the tag to be parsed */
[key: string]: {
/** The name of the property to be added to the CEM */
mappedName?: string;
/** The type of the property to be added to the CEM */
isArray?: boolean;
};
};
/**
* CEM Analyzer plugin to expand types in component metadata
* @param options Configuration options
* @returns
*/
declare function jsDocTagsPlugin(options?: Options): {
name: string;
analyzePhase(params: AnalyzePhaseParams): void;
packageLinkPhase: () => void;
} | undefined;
/**
* This function parses the JSDoc tags and adds them to the component metadata in the custom elements manifest.
* @param params Parameters passed by the analyzer
* @param tags custom jsdoc tags
* @returns
*/
declare function parseJsDocTags(params: AnalyzePhaseParams, tags: CustomTag): void;
export { type CustomTag, type Options, jsDocTagsPlugin, parseJsDocTags };