TypeScript/tests/cases/fourslash/codeFixInPropertyAccess_js.ts
Andy 3e32e15895
Add 'fixAllDescription' property to CodeFixAction (#22616)
* Add 'fixAllDescription' property to CodeFixAction

* Code review

* Add to protocol

* Make fixAllDescription be just a string
2018-03-27 18:21:21 -07:00

46 lines
652 B
TypeScript

/// <reference path='fourslash.ts' />
// @allowJs: true
// @checkJs: true
// @Filename: /a.js
//// /**
//// * @typedef Foo
//// * @property foo
//// */
//// /**
//// * @param {Foo.foo} inst
//// */
//// function blah(inst) {
//// return false;
//// }
verify.codeFixAll({
fixId: "correctQualifiedNameToIndexedAccessType",
fixAllDescription: "Rewrite all as indexed access types",
newFileContent:
`/**
* @typedef Foo
* @property foo
*/
/**
* @param {Foo["foo"]} inst
*/
function blah(inst) {
return false;
}`,
});
/**
* @typedef Foo
* @property foo
*/
/**
* @param {Foo.foo} inst
*/
function blah(inst) {
return false;
}