typedoc-plugin-markdown icon indicating copy to clipboard operation
typedoc-plugin-markdown copied to clipboard

RFC (docusaurus-plugin-typedoc): Tabulate call signatures

Open Nytelife26 opened this issue 4 years ago • 2 comments
trafficstars

Docusaurus has the ability to tabulate markdown. Given that TypeDoc's default is to tabulate call signatures, why not do the same for the plugin? Of course, the feature should be optional, in case some people prefer the current style - but it does raise the question, should we not support tabulation for more compact documentation?

Nytelife26 avatar Apr 06 '21 20:04 Nytelife26

Looks interesting but I am trying to figure out in what scenario TypeDoc tabulates call signatures. Do you have a code sample?

tgreyuk avatar Apr 06 '21 22:04 tgreyuk

Looks interesting but I am trying to figure out in what scenario TypeDoc tabulates call signatures. Do you have a code sample?

Sure! For example, in a package I have contributed to:

This table 2021-04-07_22-37-03

is parsed from this set of call signatures


	/**
	 * Similar to [[Args.peekResult]] but returns the value on success, throwing otherwise.
	 * @param type The function, custom argument, or argument name.
	 * @example
	 * ...
	 */
	public async peek<T>(type: () => ArgumentResult<T>): Promise<T>;
	/**
	 * Similar to [[Args.peekResult]] but returns the value on success, throwing otherwise.
	 * @param type The function, custom argument, or argument name.
	 * @example
	 * ...
	 */
	public async peek<T>(type: IArgument<T>, options?: ArgOptions): Promise<T>;
	/**
	 * Similar to [[Args.peekResult]] but returns the value on success, throwing otherwise.
	 * @param type The function, custom argument, or argument name.
	 * @example
	 * ...
	 */
	public async peek<K extends keyof ArgType>(type: (() => ArgumentResult<ArgType[K]>) | K, options?: ArgOptions): Promise<ArgType[K]>;

Nytelife26 avatar Apr 07 '21 21:04 Nytelife26

Going to close this as it doesn't really work with horizontal tabs. On a general point it keeps it a bit cleaner keeping the output as Markdown rather than introducing mdx components.

tgreyuk avatar May 14 '23 21:05 tgreyuk