2019-03-22 23:17:50 +01:00
|
|
|
/// <reference path="fourslash.ts" />
|
|
|
|
|
|
|
|
// @Filename: f.ts
|
|
|
|
|
|
|
|
////class A {
|
2019-06-13 21:25:02 +02:00
|
|
|
//// [|[|{| "contextRangeIndex": 0 |}constructor|](s: string) {}|]
|
2019-03-22 23:17:50 +01:00
|
|
|
////}
|
|
|
|
////class B extends A { }
|
2019-06-13 21:25:02 +02:00
|
|
|
////[|export { [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 2 |}A|], [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 2 |}B|] };|]
|
2019-03-22 23:17:50 +01:00
|
|
|
|
|
|
|
// @Filename: a.ts
|
|
|
|
|
2019-06-13 21:25:02 +02:00
|
|
|
////[|import { [|{| "contextRangeIndex": 5 |}A|] as A1 } from "./f";|]
|
2019-03-22 23:17:50 +01:00
|
|
|
////const a1 = new [|A1|]("a1");
|
|
|
|
////export default class extends A1 { }
|
2019-06-13 21:25:02 +02:00
|
|
|
////[|export { [|{| "contextRangeIndex": 8 |}B|] as [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 8 |}B1|] } from "./f";|]
|
2019-03-22 23:17:50 +01:00
|
|
|
|
|
|
|
// @Filename: b.ts
|
|
|
|
|
2019-06-13 21:25:02 +02:00
|
|
|
////[|import [|{| "contextRangeIndex": 11 |}B|], { B1 } from "./a";|]
|
2019-03-22 23:17:50 +01:00
|
|
|
////const d = new [|B|]("b");
|
|
|
|
////const d1 = new [|B1|]("b1");
|
|
|
|
|
|
|
|
verify.noErrors();
|
2019-06-06 00:01:34 +02:00
|
|
|
const [aCtrDef, aCtr, exportDef, aExport, bExport, aImportDef, aImport, a1New, reExportDef, bReExport, b1Export, bDefaultDef, bDefault, bNew, b1New ] = test.ranges();
|
2019-03-22 23:17:50 +01:00
|
|
|
verify.referenceGroups(aCtr, [
|
|
|
|
{ definition: "class A", ranges: [aCtr, aExport] },
|
|
|
|
{ definition: "class B", ranges: [bExport]},
|
|
|
|
{ definition: "(alias) class B\nexport B", ranges: [bReExport]},
|
|
|
|
{ definition: "(alias) class B1\nexport B1", ranges: [b1Export]},
|
|
|
|
{ definition: "(alias) class B1\nimport B1", ranges: [b1New]},
|
|
|
|
{ definition: "(alias) class A\nexport A", ranges: [aImport]},
|
|
|
|
{ definition: "(alias) class A1\nimport A1", ranges: [a1New]},
|
|
|
|
{ definition: "class default", ranges: []},
|
|
|
|
{ definition: { text: "import B", range: bDefault }, ranges: [bNew]}]);
|