TypeScript/tests/cases/fourslash/typeOfSymbol_localSymbolOfExport.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

13 lines
419 B
TypeScript

/// <reference path='fourslash.ts'/>
////export function f() {}
////[|1|];
const ranges = test.ranges();
const symbolsInScope = test.symbolsInScope(ranges[0]);
const f = symbolsInScope.find(s => s.name === "f");
if (f === undefined) throw new Error("'f' not in scope");
if (f.exportSymbol === undefined) throw new Error("Expected to get the local symbol");
verify.typeOfSymbolAtLocation(ranges[0], f, "() => void");