Skip to content

Extra ? added to method in method signature completion for optional method #46589

Closed
@mjbvz

Description

@mjbvz

Bug Report

🔎 Search Terms

  • Method signature completions
  • suggest / suggestions
  • completions

🕗 Version & Regression Information

4.5.0-dev.20211029

💻 Code

For the code:

interface IFoo {
    barOpt?(x: number): void;
}

class Foo implements IFoo {
    |
 }

Complete barOpt inside Foo

🙁 Actual behavior

barOpt gets added with a ?

interface IFoo {
    barOpt?(x: number): void;
}

class Foo implements IFoo {
    barOpt?(x: number): void {
        
    }
}

🙂 Expected behavior

Since we have implemented the method, I'd expect us the remove the ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: Completion ListsThe issue relates to showing completion lists in an editorEffort: CasualGood issue if you're already used to contributing to the codebase. Harder than "good first issue".Fix AvailableA PR has been opened for this issueGood First IssueWell scoped, documented and has the green lightHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions