TypeScript/tests/cases/fourslash/renameCrossJsTs01.ts

14 lines
460 B
TypeScript
Raw Normal View History

2016-01-28 20:26:32 +01:00
/// <reference path='fourslash.ts'/>
// @allowJs: true
// @Filename: a.js
2019-06-13 21:25:02 +02:00
////[|exports.[|{| "contextRangeIndex": 0 |}area|] = function (r) { return r * r; }|]
2016-01-28 20:26:32 +01:00
// @Filename: b.ts
2019-06-13 21:25:02 +02:00
////[|import { [|{| "contextRangeIndex": 2 |}area|] } from './a';|]
////var t = [|area|](10);
2016-01-28 20:26:32 +01:00
2019-06-03 22:49:42 +02:00
const [r0Def, r0, r1Def, r1, r2] = test.ranges();
verify.renameLocations(r0, [r0, r1, r2]);
verify.renameLocations([r1, r2], [{ range: r1, prefixText: "area as " }, r2]);