Skip to content

SamarinIvan/jsdoc-generator

 
 

Repository files navigation

JSDoc Generator - README

Automatic JSDoc generator for TypeScript and Typescript React.


Features

Generates specific JSDoc for any supported TypeScript node.

It can be generated for a single node by explicitly calling the command Generate JSDoc or by using auto-completion: Generate JSDoc demo Can also be generated for all supported TypeScript nodes in a single file that do not already have a JSDoc by calling the command Generate JSDoc for the current file: Generate JSDoc demo

Extension Settings

This extension contributes the following settings:

  • jsdoc-generator.descriptionPlaceholder:
    Set the description placeholder. Empty to disable.
    Default: "Description placeholder"
  • jsdoc-generator.author:
    Set the value for the author tag.
    Empty to disable, set to "author" to insert "author" as placeholder.
    Default: ""
  • jsdoc-generator.includeDate:
    When enabled, will include the date tag.
    Default: false
  • jsdoc-generator.includeTime:
    When both this and jsdoc-generator.includeDate are enabled, will include the current local time in the date tag.
    Default: true
  • jsdoc-generator.includeParenthesisForMultipleTypes:
    When enabled, will include round brackets around union and intersection types.
    Note that round brackets will still be used if manually put in the type or for union and intersection types which are also optional or mandatory.
    Default: true
  • jsdoc-generator.descriptionForConstructors:
    "{Object}" will be replaced with the class name.
    For default exported classes without a name jsdoc-generator.descriptionPlaceholder will be used instead.
    Empty to disable.
    Default: "Creates an instance of {Object}."
  • jsdoc-generator.functionVariablesAsFunctions:
    When enabled, will document variables with a function assigned as function declarations.
    Disable to document like properties.
    Default: true
  • jsdoc-generator.includeExport:
    When enabled, will include the export tag.
    Disable to exclude it from the generated JSDoc.
    Default: true
  • jsdoc-generator.includeAsync:
    When enabled, will include the async tag.
    Disable to exclude it from the generated JSDoc.
    Default: true

Commands

  • Generate JSDoc
    Generates JSDoc for the TypeScript node the caret is in or on. Available also for auto-completion by typing /** at the start of a line.
  • Generate JSDoc for the current file
    Generates JSDoc for the currently open file for all TypeScript nodes that do not have one.
    Eventually choosing a keyboard shortcut is left to the user.
  • Generate JSDoc for all TypeScript files
    Currently only prompts a message saying This function is not available yet.
    Eventually choosing a keyboard shortcut is left to the user.

Known Issues

Type inference does not work for variable declarations without an initializer.
Some non everyday types are not correctly inferred and treated as any or empty object.


Release Notes

Added two setting options

Added support for Typescript React.

Initial release of JSDoc Generator.

About

JSDoc automated generation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%