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 autocomplete should not apply to classes #7325

Closed
NoelAbrahams opened this issue Mar 1, 2016 · 8 comments
Closed

JSDoc autocomplete should not apply to classes #7325

NoelAbrahams opened this issue Mar 1, 2016 · 8 comments
Labels
Suggestion An idea for TypeScript Working as Intended The behavior described is the intended behavior; this is not a bug

Comments

@NoelAbrahams
Copy link

Version: TS 1.8.2 / VS 2015

I find the following JSDoc autocomplete terribly annoying:

sample

My JSDoc for classes is almost always a one-liner:

/** This is the documentation for this class */
export class Position {
}

Please consider removing this autocomplete feature for classes, or at least provide an option for turning it off.

Thanks!

@RyanCavanaugh RyanCavanaugh added the Suggestion An idea for TypeScript label Mar 1, 2016
@RyanCavanaugh
Copy link
Member

I don't think we'd have construct-specific options or behavior for this, but an option to turn it off entirely seems reasonable.

@RyanCavanaugh RyanCavanaugh added the In Discussion Not yet reached consensus label Mar 1, 2016
@NoelAbrahams
Copy link
Author

The autocomplete for methods and functions is certainly useful, as it can save having to type out parameters, e.g.

/**
    * 
    * @param instance
    * @param startPosition
    * @param endPosition
    * @param durationMS
    */
public top(instance: {}, startPosition: string, endPosition: string, durationMS: number) 

It just doesn't make sense at the class-level.

@NoelAbrahams
Copy link
Author

Another case that I think interferes with the normal flow is when a function or method has no parameters:

sample

My JSDoc for this case is, again, typically a single line:

/** Gets a short description for each rating type. */
public getDescriptions() {

    return this.descriptions;
}

@Arnavion
Copy link
Contributor

Arnavion commented Mar 3, 2016

Just want to point out that parameter-less functions can still have @return, @template, etc annotations, so unless globally turned off with an LS option it should still be emitted.

@NoelAbrahams
Copy link
Author

In my case I find that the return is already normally in the description, e.g "Adds an item to persistent storage and returns the id".

@Arnavion
Copy link
Contributor

Arnavion commented Mar 3, 2016

Yes, I understand. I'm just saying that it shouldn't be disabled completely for parameter-less functions, but only disabled if the new option that Ryan proposed is enabled.

Edit: And class-level annotations make sense for the same reason - @template, @memberof, etc.

@RyanCavanaugh RyanCavanaugh added Working as Intended The behavior described is the intended behavior; this is not a bug and removed In Discussion Not yet reached consensus labels May 16, 2016
@RyanCavanaugh
Copy link
Member

Discussed and several people felt that having multi-line comments here made sense too. So without a consensus that one is better than the other and a desire to not have tons of skeletoning options, the current behavior is what we'd like to continue with

@NoelAbrahams
Copy link
Author

Oh dear. I have disliked JSDoc from day one, and it only gets worse with use with its intrusive and awkward style. This is bad news.

Sent from my iPhone

On 17 May 2016, at 00:02, Ryan Cavanaugh <[email protected]mailto:[email protected]> wrote:

Discussed and several people felt that having multi-line comments here made sense too. So without a consensus that one is better than the other and a desire to not have tons of skeletoning options, the current behavior is what we'd like to continue with

You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHubhttps://github.com//issues/7325#issuecomment-219573956

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Suggestion An idea for TypeScript Working as Intended The behavior described is the intended behavior; this is not a bug
Projects
None yet
Development

No branches or pull requests

3 participants