TypeScript/tests/cases/fourslash/findAllRefsForDefaultExport02.ts
Andy aa2d1008bf Completion for default export should be '.default' (#16742)
* Completion for default export should be '.default'

* Don't include empty string in name table

* getSymbolsInScope() should return local symbols, not exported symbols

* Fix bug: getSymbolAtLocation should work for local symbol too
2017-07-11 07:23:32 -07:00

24 lines
823 B
TypeScript

/// <reference path='fourslash.ts'/>
////export default function [|{| "isWriteAccess": true, "isDefinition": true |}DefaultExportedFunction|]() {
//// return [|DefaultExportedFunction|];
////}
////
////var x: typeof [|DefaultExportedFunction|];
////
////var y = [|DefaultExportedFunction|]();
////
////namespace [|{| "isWriteAccess": true, "isDefinition": true |}DefaultExportedFunction|] {
////}
const ranges = test.ranges();
const [r0, r1, r2, r3, r4] = ranges;
const fnRanges = [r0, r1, r2, r3];
const fn = "function DefaultExportedFunction(): () => typeof DefaultExportedFunction";
verify.singleReferenceGroup(fn, fnRanges);
// The namespace and function do not merge,
// so the namespace should be all alone.
verify.singleReferenceGroup(`namespace DefaultExportedFunction\n${fn}`, [r4]);