* 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
24 lines
823 B
TypeScript
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]);
|