2017-01-26 20:02:08 +01:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
|
|
|
// `export as namespace` results in global search.
|
|
|
|
|
|
|
|
// @Filename: /node_modules/a/index.d.ts
|
2019-06-13 21:25:02 +02:00
|
|
|
////[|export function [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 0 |}f|](): void;|]
|
2017-01-26 20:02:08 +01:00
|
|
|
////export as namespace A;
|
|
|
|
|
|
|
|
// @Filename: /b.ts
|
2019-06-13 21:25:02 +02:00
|
|
|
////[|import { [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 2 |}f|] } from "a";|]
|
2017-01-26 20:02:08 +01:00
|
|
|
|
|
|
|
// @Filename: /c.ts
|
|
|
|
////A.[|f|]();
|
|
|
|
|
|
|
|
verify.noErrors();
|
|
|
|
|
2019-06-06 18:00:57 +02:00
|
|
|
const [r0Def, r0, r1Def, r1, r2] = test.ranges();
|
2017-01-26 20:02:08 +01:00
|
|
|
|
|
|
|
const globals = { definition: "function f(): void", ranges: [r0, r2] };
|
2017-10-26 02:50:11 +02:00
|
|
|
const imports = { definition: "(alias) function f(): void\nimport f", ranges: [r1] };
|
2017-01-26 20:02:08 +01:00
|
|
|
|
|
|
|
verify.referenceGroups([r0, r2], [globals, imports]);
|
|
|
|
verify.referenceGroups(r1, [imports, globals]);
|