Skip to content

js/ts: generate overridden methods  #46038

Closed

Description

@ribrdb

I'd really like a code action "Override method..." that would give a list of methods from the ancestor classes/interfaces. I'd choose one (or more) then it generates stub overrides that have the same signature and a jsdoc /** OverRide */ comment. Maybe also a call to the super method.
It'd also be handy if there were a quick action to generate all the missing or abstract methods from super classes/interfaces.

Activity

  1. rendaw commented on Apr 6, 2018

    @rendaw

    Or when someone starts typing an inherited method name into the class body. Related: #21343

    The current workflow is:

    1. Start typing method
    2. Method suggestion pops up with arguments and types
    3. Press enter. The method name is completed and flagged as an error since it looks like a property
    4. Add parentheses + braces, the error disappears with no way to autocorrect to the parent signature
    5. Go look up documentation and copy the signature by hand
  2. mjbvz commented on Oct 8, 2019

    @mjbvz
    Contributor

    Closing this in favor of microsoft/TypeScript#25207 upstream. Please upvote that issue if you are interested in seeing this supported

  3. added
    upstreamIssue identified as 'upstream' component related (exists outside of VS Code)
    on Oct 8, 2019
  4. locked and limited conversation to collaborators on Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestRequest for new features or functionalityjavascriptJavaScript support issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions