Giter VIP home page Giter VIP logo

jsdoc-generator's People

Contributors

crystal-spider avatar mickelangelopohren avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

jsdoc-generator's Issues

Alignment options

Is your feature request related to a problem? Please describe.
I like to vertically align my code when I can, having this bet a setting or supported feature would be a nice convenience for me.

Describe the solution you'd like
this documentation:

/**
 * Description placeholder
 * @date 9/30/2023
 *
 * @param {*} paramOne param description
 * @param {*} ptwo param description
 * @param {*} parameterThree param description
 * @param {...{}} args param description
 * 
 * @returns {boolean} return description
 */

would be aligned like this

/**
* Description placeholder
* @date 9/30/2023
*
* @param {*}      paramOne        param description
* @param {*}      ptwo            param description
* @param {*}      parameterThree  param description
* @param {...{}}  args            param description
* 
* @returns {boolean}              return description
*/

Describe alternatives you've considered
Either as a true/false option, or as some sort of format support for tags, similar to the Doxygen Document Generator extension.

V2.0.1 missing comment terminator

Describe the bug
V2.0.1 missing comment terminator

To Reproduce
Steps to reproduce the behavior:

  1. Writing method
const run = (a) => {
  console.log(a);
}
  1. run jsDoc generate

Expected behavior
Like v1.3.0, correct code comments

Screenshots
v1.3.0
image
v2.0.1
image
Additional context

Environment used
Typescript version: 5.3.3
VSC versione: 1.86.2
OS: Mac Darwin x64 23.2.0

Bug

Describe the bug
Use of semi colon instead of comma for objects

Bug

/**
 * Description:- example variable for this issue
 *
 * @type {{ id: number; name: string; }}
 */
const example = {
    id: 1,
    name: 'Jon doe'
}

Expected behavior

/**
 * Description:- example variable for this issue
 *
 * @type {{ id: number, name: string }}
 */
const example = {
    id: 1,
    name: 'Jon doe'
}

Additional context
Error on console while generating docs

ERROR: Unable to parse a tag's type expression for source file D:\Development\javascript project\jsDoc\assets\scripts\main.js in line 20 with tag 
title "type" and text "{{ id: number; name: string; }}": Invalid type expression "{ id: number; name: string; }": Expected "!", "#", "$", "(", ",", "-", ".", "/", "0", ":", "<", "=", "?", "@", "[]", "\\", "_", "|", "}", "~", "‌", "‍", Unicode combining mark, Unicode decimal number, Unicode l
etter number, Unicode lowercase letter, Unicode modifier letter, Unicode other letter, Unicode punctuation connector, Unicode titlecase letter, Unicode uppercase letter, or [1-9] but ";" found.

Environment used
Typescript version: x.x.x
VSC versione: x.x.x
OS: [e.g. iOS]

Date locale options

Is your feature request related to a problem? Please describe.
When generating a new JSDoc with jsdoc-generator.includeDate enabled it uses American date format "mm/dd/yyyy", however, I code in both Japanese and British codebases, which use either "yyyy/mm/dd" or "dd/mm/yyyy", which requires a minor change on each generation.

Describe the solution you'd like
Ability to set the locale of the date format in the settings. I.e. a string in preferences which lists "mm/dd/yyyy"

Describe alternatives you've considered
I have considered editing the snippet directly or looking at basic snippets, but I miss features of this generator too much

Environment used

VSC version: 1.88.1
OS: Windows 10

Multiline params are not recognized with typescript syntax highlighting

Describe the bug
Multiline params are not recognized with typescript syntax highlighting

To Reproduce
Steps to reproduce the behavior:

  1. Create a function with an argument that containers a type defined over multiple lines
  2. Auto-generate JSDoc comments for the file
  3. Observe that the syntax highlighting does not work because no asterisks were inserted on new lines

Expected behavior
An asterisk is inserted at each new line so the syntax highlighting works correctly

Screenshots
Actual output:
image

Expected output:
image

Additional context
See microsoft/vscode#108237

Environment used
Typescript version: 5.2.2
VSC version: 1.84.0-insider
OS: Windows 11

Feature request: Omit types in typescript files

Is your feature request related to a problem? Please describe.
In Typescript, types are defined in code. Defining them again in jsdoc, may lead to inconsistenties when changing type in code, and forgetting to also update the jsdoc. Moreover, they are superfluous, as the editor doesn't need jsdoc to display types for intellisense popups.

Describe the solution you'd like
An option to enable adding types to generated jsdoc in .ts and .tsx files.

So that if a developer needs them, for example to generate separate documentation using a generator tool. I feel this option should be set to disabled by default, as adding types in jsdoc in typescript is technically superfluous.

Describe alternatives you've considered
N/A

Environment used
Typescript version: 4.9.3
VSC versione: 1.74.1
OS: Windows 10

Feature request: remove @typedef when includeTypes is set to false

Thank you for this extension! The only issue I've had with it is, after setting includeTypes to false, @typedef is still included in the JSDocs generated.

It would be great to have either:

  • When includeTypes is false, no @typedef is generated
  • A setting to remove arbitrary tags

If you would like, I can create a pull request for this. Thanks!

Typescript Interface properties into jsdoc

Dear All,

How can I integrate typescript Interface properties into jsdoc with this extension?

Like this:

/**
 * @property {string[]} days - ...
 * @property {WorksOfDaysOfEmployments} worksOfDaysOfEmployments - ...
 */
interface Matrix {
    days: string[]
    worksOfDaysOfEmployments: WorksOfDaysOfEmployments
}

Thanks: Bela

Bug

Describe the bug
The messages says: Correctly generated 19 JSDocs! but just on the last function was generated the comment

To Reproduce
Steps to reproduce the behavior:

  1. Generate for current file

Expected behavior
When try to generate comments for a file, it says it did 19 docs but just on last function the comment was added

Environment used
Typescript version: 4.9.5
VSC versione: 1.75.1
OS: Darwin x64 22.1.0

Links to Github are behind by 1 commit

If I create my docs and view them, the links to the code and line number in github are 1 commit behind. I have to generate the docs again after pushing my commit, so the links link to the correct commit, so then I have to do yet another commit.

Svelte & Sveltekit support

I noticed that theres an existing issue for requesting Vue support, but once Vue is completed, can we have Svelte and Sveltekit file support aswell? Thanks

Add Vue.js support

Thanks for the great extension! Is it possible to add support for .vue files?

Unable to generate JSDoc: typescriptreact is not supported.

Hello!
I use Typescript with React.
The file extension is .tsx
The association for .tsx is "TypeScript React".

If I try to use "Generate JSDoc" I get the following error:
Unable to generate JSDoc: typescriptreact is not supported.

Can you fix this?

What about generic extends in Typescript

The code:

const sayHello = <N extends string>(name: N): `Hello, ${N}` => {
	return `Hello, ${name}`;
};

Generating:

/**
 * Description placeholder
 *
 * @template N
 * @param {N} name
 * @returns {`Hello, ${N}`}
 */

But should be

/**
 * Description placeholder
 *
 * @template {string} N <-- extends string
 * @param {N} name
 * @returns {`Hello, ${N}`}
 */

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.