-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationDomain: Refactoringse.g. extract to constant or function, rename symbole.g. extract to constant or function, rename symbolFix AvailableA PR has been opened for this issueA PR has been opened for this issue
Milestone
Description
Bug Report
π Search Terms
JSDoc typedef property rename
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
/**
* @typedef {{
* foo: string;
* bar: number;
* }} Foo
*/
/** @type {Foo} */
const x = {
foo: "",
bar: 42 // <-- see document highlight and rename on 'bar'
};
π Actual behavior
-
After renaming a property in
x
, the*
(including spaces) get deleted from the@typedef
. -
(VS Code only, not Playground) Renaming in the
@typedef
treats the*
as part of the name, and leaving it in adds*
to the property declaration inx
:
π Expected behavior
Rename works without breaking source code or comment formatting. Document highlight does not highlight the leading *
.
awerlogus
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationDomain: Refactoringse.g. extract to constant or function, rename symbole.g. extract to constant or function, rename symbolFix AvailableA PR has been opened for this issueA PR has been opened for this issue