镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

JSDoc autocomplete should not apply to classes #7325

Description

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!

Activity

  1. RyanCavanaugh commented on Mar 1, 2016

    @RyanCavanaugh
    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.

  2. NoelAbrahams commented on Mar 1, 2016

    @NoelAbrahams
    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.

  3. NoelAbrahams commented on Mar 3, 2016

    @NoelAbrahams
    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;
    }
  4. Arnavion commented on Mar 3, 2016

    @Arnavion
    Contributor

    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.

  5. NoelAbrahams commented on Mar 3, 2016

    @NoelAbrahams
    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".

  6. Arnavion commented on Mar 3, 2016

    @Arnavion
    Contributor

    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.

  7. RyanCavanaugh commented on May 16, 2016

    @RyanCavanaugh
    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

  8. NoelAbrahams commented on May 16, 2016

    @NoelAbrahams
    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 <notifications@github.commailto:notifications@github.com> 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

  9. locked and limited conversation to collaborators on Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    SuggestionAn idea for TypeScriptWorking as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions