TypeScript/tests/cases/fourslash/codeFixCorrectQualifiedNameToIndexedAccessType_all.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

19 lines
391 B
TypeScript

/// <reference path='fourslash.ts' />
////interface Foo {
//// bar: string;
////}
////const x: Foo.bar = "";
////const y: Foo.bar = "";
verify.codeFixAll({
fixId: "correctQualifiedNameToIndexedAccessType",
fixAllDescription: "Rewrite all as indexed access types",
newFileContent:
`interface Foo {
bar: string;
}
const x: Foo["bar"] = "";
const y: Foo["bar"] = "";`,
});