UNPKG

typedoc-plugin-markdown

Version:

A TypeDoc plugin that generates TypeScript API documentation as Markdown.

14 lines (13 loc) • 608 B
import { SomeType } from 'typedoc'; /** * Whether a type must be wrapped in parentheses when it is the operand of a * postfix such as `[]` or `?`, so that `(() => void)[]` is not rendered as * `() => void[]`, which reads as a function returning an array. */ export declare function needsParentheses(type: SomeType): boolean; /** * Whether a type must be wrapped in parentheses when it is a member of an * intersection, so that `A & (() => void)` is not rendered as * `A & () => void`, which is not valid TypeScript. */ export declare function needsParenthesesInIntersection(type: SomeType): boolean;