TypeScript/tests/cases/fourslash/findAllRefsForDefaultExport02.ts

22 lines
846 B
TypeScript
Raw Normal View History

2015-05-16 02:00:13 +02:00
/// <reference path='fourslash.ts'/>
2019-06-13 21:25:02 +02:00
////[|export default function [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 0 |}DefaultExportedFunction|]() {
//// return [|DefaultExportedFunction|];
2019-06-06 00:01:34 +02:00
////}|]
2015-05-16 02:00:13 +02:00
////
////var x: typeof [|DefaultExportedFunction|];
////
////var y = [|DefaultExportedFunction|]();
////
2019-06-13 21:25:02 +02:00
////[|namespace [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 5 |}DefaultExportedFunction|] {
2019-06-06 00:01:34 +02:00
////}|]
2019-06-06 00:01:34 +02:00
const [r0Def, r0, r1, r2, r3, r4Def, r4] = test.ranges();
const fnRanges = [r0, r1, r2, r3];
verify.singleReferenceGroup("function DefaultExportedFunction(): () => typeof DefaultExportedFunction", fnRanges);
2015-05-16 02:00:13 +02:00
// The namespace and function do not merge,
// so the namespace should be all alone.
verify.singleReferenceGroup(`namespace DefaultExportedFunction`, [r4]);