TypeScript/tests/cases/fourslash/refactorExtractType_js7.ts
2019-10-28 10:30:59 -07:00

19 lines
420 B
TypeScript

/// <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) {}`,
});