Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSDoc auto-fill only works on functions #4447

Closed
5 of 15 tasks
sophiajt opened this issue Aug 25, 2015 · 6 comments
Closed
5 of 15 tasks

JSDoc auto-fill only works on functions #4447

sophiajt opened this issue Aug 25, 2015 · 6 comments
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@sophiajt
Copy link
Contributor

Currently JSDoc auto-fill for comment scaffolding seems to only work for functions. This should also work for other forms like classes, methods, namespaces, etc


Edit by @DanielRosenwasser
Adapted from list below:

  • methods
  • classes
  • class constructors
  • namespaces
  • variables
  • property assignments
  • property declarations
  • computed properties
  • enums
  • enum members
  • index signatures
  • interfaces
  • type aliases
  • IIFEs?
  • parenthesized expressions
@danquirk danquirk added Suggestion An idea for TypeScript In Discussion Not yet reached consensus labels Aug 25, 2015
@zhengbli zhengbli added Bug A bug in TypeScript and removed Suggestion An idea for TypeScript labels Sep 21, 2015
@zhengbli
Copy link
Contributor

There are a list of elements that the JsDoc scaffolding should be enabled on:

  • methods
  • classes
  • class constructors
  • namespaces
  • variables

@weswigham
Copy link
Member

I think it would also be useful to be able to have them enabled at the marker here (so on parenthesized expressions):

var x = /**/ (y);

because in closure compiler you do inline casts with jsdoc comments like so:

var x = /** @type {Foo.Bar} */ (y);

VSCode's jsdoc insertion does this already.

@DanielRosenwasser
Copy link
Member

@weswigham fair point, added

@yuit
Copy link
Contributor

yuit commented Sep 25, 2015

It will be pretty nifty to add :

  • type annotation in to @param and @returns when available
  • dive into binding element and grab the parameter name from the inside

@DanielRosenwasser
Copy link
Member

I think that should be part of a separate issue @yuit. Also, I wonder the utility of the type annotations since in TypeScript you already have type annotations.

@mhegazy
Copy link
Contributor

mhegazy commented Feb 22, 2016

the main ones outlined here were fixed. please file other issues if the other ones are still needed.

@mhegazy mhegazy closed this as completed Feb 22, 2016
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Feb 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

7 participants