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

'Add missing function decoration' quick fix can duplicate //@ts-check comment #43006

Closed
mjbvz opened this issue Mar 1, 2021 · 0 comments · Fixed by #43021
Closed

'Add missing function decoration' quick fix can duplicate //@ts-check comment #43006

mjbvz opened this issue Mar 1, 2021 · 0 comments · Fixed by #43021
Labels
Bug A bug in TypeScript Domain: Quick Fixes Editor-provided fixes, often called code actions. Fix Available A PR has been opened for this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Mar 1, 2021

Bug Report

🔎 Search Terms

  • ts check
  • quick fix
  • code action

🕗 Version & Regression Information

4.3.0-dev.20210228

💻 Code

For the javascript:

//@ts-check

add(1, 2);

Use add missing function declaration on add

🙁 Actual behavior

The ts check comment is duplicated

//@ts-check

add(1, 2);
function //@ts-check
    add(arg0, arg1) {
        throw new Error("Function not implemented.");
}

🙂 Expected behavior

//@ts-check

add(1, 2);
function add(arg0, arg1) {
        throw new Error("Function not implemented.");
}
@DanielRosenwasser DanielRosenwasser added Bug A bug in TypeScript Domain: Refactorings e.g. extract to constant or function, rename symbol labels Mar 2, 2021
@DanielRosenwasser DanielRosenwasser added this to the TypeScript 4.2.3 milestone Mar 2, 2021
@DanielRosenwasser DanielRosenwasser added the Fix Available A PR has been opened for this issue label Mar 2, 2021
@DanielRosenwasser DanielRosenwasser added Domain: Quick Fixes Editor-provided fixes, often called code actions. and removed Domain: Refactorings e.g. extract to constant or function, rename symbol labels Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: Quick Fixes Editor-provided fixes, often called code actions. Fix Available A PR has been opened for this issue
Projects
None yet
2 participants