2018-01-04 21:45:16 +01:00
|
|
|
/// <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",
|
2018-03-28 03:21:21 +02:00
|
|
|
fixAllDescription: "Rewrite all as indexed access types",
|
2018-01-04 21:45:16 +01:00
|
|
|
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;
|
|
|
|
}
|