mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Component commits:
07a371bbf6 Fix extract type on JS function params
This commit is contained in:
committed by
Andrew Branch
parent
6317c901d7
commit
9df593b1f3
@@ -0,0 +1,18 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
// @allowJs: true
|
||||
// @Filename: a.js
|
||||
////function a(/** @type {/*a*/string/*b*/} */ b) {}
|
||||
|
||||
goTo.file('a.js')
|
||||
goTo.select("a", "b");
|
||||
edit.applyRefactor({
|
||||
refactorName: "Extract type",
|
||||
actionName: "Extract to typedef",
|
||||
actionDescription: "Extract to typedef",
|
||||
newContent: `/**
|
||||
* @typedef {string} /*RENAME*/NewType
|
||||
*/
|
||||
|
||||
function a(/** @type {NewType} */ b) {}`,
|
||||
});
|
||||
Reference in New Issue
Block a user