2014-07-13 01:04:16 +02:00
|
|
|
/// <reference path="fourslash.ts"/>
|
|
|
|
|
|
|
|
////function foo(a: number): string {
|
|
|
|
//// /*insideFunctionDeclaration*/
|
|
|
|
//// return "";
|
|
|
|
////}
|
|
|
|
////
|
|
|
|
////(function foo(): number {
|
|
|
|
//// /*insideFunctionExpression*/
|
|
|
|
//// fo/*referenceInsideFunctionExpression*/o;
|
|
|
|
//// return "";
|
|
|
|
////})
|
|
|
|
////
|
|
|
|
/////*globalScope*/
|
|
|
|
////fo/*referenceInGlobalScope*/o;
|
|
|
|
|
|
|
|
goTo.marker("globalScope");
|
|
|
|
verify.memberListContains("foo");
|
|
|
|
|
|
|
|
goTo.marker("insideFunctionDeclaration");
|
|
|
|
verify.memberListContains("foo");
|
|
|
|
|
|
|
|
goTo.marker("insideFunctionExpression");
|
|
|
|
verify.memberListContains("foo");
|
|
|
|
|
|
|
|
goTo.marker("referenceInsideFunctionExpression");
|
2014-09-29 18:49:09 +02:00
|
|
|
verify.quickInfoIs("(local function) foo(): number");
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("referenceInGlobalScope");
|
2014-09-29 18:49:09 +02:00
|
|
|
verify.quickInfoIs("(function) foo(a: number): string");
|