2015-03-02 23:41:44 +01:00
|
|
|
/// <reference path="fourslash.ts" />
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
////module Alpha {
|
|
|
|
//// export var [|{| "name" : "def" |}x|] = 100;
|
|
|
|
////}
|
|
|
|
////
|
|
|
|
////module Beta {
|
|
|
|
//// import p = Alpha.[|{| "name" : "import" |}x|];
|
|
|
|
////}
|
2015-03-02 23:41:44 +01:00
|
|
|
////
|
|
|
|
////var x = Alpha.[|{| "name" : "mem" |}x|]
|
|
|
|
|
|
|
|
goTo.marker('import');
|
2018-10-29 18:03:25 +01:00
|
|
|
verify.completions({ includes: { name: "x", text: "var Alpha.x: number" } });
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
var def: FourSlashInterface.Range = test.ranges().filter(range => range.marker.data.name === "def")[0];
|
2015-03-02 23:41:44 +01:00
|
|
|
var imp: FourSlashInterface.Range = test.ranges().filter(range => range.marker.data.name === "import")[0];
|
|
|
|
var mem: FourSlashInterface.Range = test.ranges().filter(range => range.marker.data.name === "mem")[0];
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
verify.occurrencesAtPositionContains(def);
|
2015-03-02 23:41:44 +01:00
|
|
|
verify.occurrencesAtPositionContains(imp);
|
|
|
|
verify.occurrencesAtPositionContains(mem);
|
|
|
|
|
2016-08-29 22:34:32 +02:00
|
|
|
verify.goToDefinitionIs("def");
|