UNPKG

@appium/typedoc-plugin-appium

Version:

TypeDoc plugin for Appium & its extensions

31 lines 1.48 kB
/** * Utilities to derive comments from various sources * @module */ import { Comment, CommentTag } from 'typedoc'; import { ExtractedExamples } from '../types'; export declare const NAME_EXAMPLE_TAG = "@example"; /** * Clones a comment. Mostly. I think. * @param comment Comment to clone * @param blockTags Block tags to use; if not provided, the comment's block tags will be used (these * are also cloned) * @returns A new comment */ export declare function cloneComment(comment: Comment, blockTags?: CommentTag[]): Comment; /** * Finds any `@example` tags within a comment and creates an {@linkcode ExtractedExamples} object * for them. Creates a new comment with the examples removed, so we can handle them in a * custom way via our theme. * * Note that the same `Comment` can be passed multiple times (if it is displayed in multiple * modules). Our choices are either to a) clone the comment each time, or b) memoize the function * in order to avoid a problem wherein the comment has its examples extracted on the first call, but * subsequent calls will not contain any examples (since they've already been extracted). It may be * more memory-friendly to memoize, but it may not be the safest thing to do (unclear). * * @param comment A comment to extract examples from * @returns New comment (with examples removed) */ export declare const extractExamples: (comment?: Comment) => ExtractedExamples | undefined; //# sourceMappingURL=index.d.ts.map