Skip to content

Commit

Permalink
fix: improve jsdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Aug 31, 2021
1 parent 0cd0108 commit aefdd06
Showing 1 changed file with 24 additions and 12 deletions.
36 changes: 24 additions & 12 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,21 @@ export type JsonObject = {
* It will also Title Case every key for readability. To overwrite this behavior,
* you can specify how a key should be displayed to the user.
*
* Example:
* `{ data: { theURL: 'https://example.com' } }
* Renders as:
* @example
* { data: { theURL: 'https://example.com' } }
* // Renders as:
* Key Value
* ------- -------------------
* The URL https://example.com
*
* Example:
* `{ keys: { theURL: 'Url' }, data: { theURL: 'https://example.com' } }
* Renders as:
* @example
* {
* data: { theURL: 'https://example.com' }
* keys: { theURL: 'Url' },
* }
* // Renders as:
* Key Value
* --- -------------------
* Url https://example.com
*/
export namespace EnvDisplay {
Expand All @@ -43,17 +48,24 @@ export namespace EnvDisplay {
* headers are Title Cased for readability. To overwrite a column name specifiy it the `keys`
* property.
*
* Example:
* `{ title: 'My Envs', data: { username: 'foo', theURL: 'https://example.com' } }
* Renders as:
* @example
* {
* title: 'My Envs',
* data: { username: 'foo', theURL: 'https://example.com' }
* }
* // Renders as:
* My Envs
* ================================
* | Username | The URL
* | foo | https://example.com
*
* Example:
* `{ keys: { theURL: 'Url', username: 'Name' }, data: { username: 'foo', theURL: 'https://example.com' } }
* Renders as:
* @example
* {
* data: { username: 'foo', theURL: 'https://example.com' }
* keys: { theURL: 'Url', username: 'Name' },
* }
*
* // Renders as:
* My Envs
* ============================
* | Name | Url
Expand Down

0 comments on commit aefdd06

Please sign in to comment.