doc_website icon indicating copy to clipboard operation
doc_website copied to clipboard

Improve type alias doc generation

Open jsejcksn opened this issue 4 years ago • 1 comments

Bug: Currently, type aliases with optional members don't generate question marks for the member keys.

Enhancement: Generate descriptions from JSDoc comments for type alias members, in the same way they're generated for interface members. For comparison, see https://doc.deno.land/https/deno.land/std/fs/copy.ts#CopyOptions

Source:

export type ReadTextOptions = {
  /**
   * Trim leading and trailing whitespace. Default is `true`
   */
  trim?: boolean;
  /**
   * Convert all CRLF newlines to LF newlines. Default is `true`
   */
  unixNewlines?: boolean;
};

Generated:

type ReadTextOptions: { trim: boolean, unixNewlines: boolean }

Sorry I don't have a link to provide: that example data was from an ephemeral repo that I deleted. Here are screenshots:

source doc

jsejcksn avatar Jun 11 '20 23:06 jsejcksn

I think this is actually an upstream denoland/deno issue. cc @bartlomieju

lucacasonato avatar Jun 20 '20 12:06 lucacasonato