2014-07-13 01:04:16 +02:00
|
|
|
/// <reference path="fourslash.ts" />
|
|
|
|
|
|
|
|
////module TestModule {
|
|
|
|
//// var localVariable = "";
|
2018-10-29 18:03:25 +01:00
|
|
|
//// export var exportedVariable = 0;
|
2014-07-13 01:04:16 +02:00
|
|
|
////
|
|
|
|
//// function localFunction() { }
|
|
|
|
//// export function exportedFunction() { }
|
|
|
|
////
|
|
|
|
//// class localClass { }
|
|
|
|
//// export class exportedClass { }
|
|
|
|
////
|
|
|
|
//// interface localInterface {}
|
|
|
|
//// export interface exportedInterface {}
|
|
|
|
////
|
2018-01-17 21:05:31 +01:00
|
|
|
//// module localModule {
|
2014-07-13 01:04:16 +02:00
|
|
|
//// export var x = 0;
|
|
|
|
//// }
|
|
|
|
//// export module exportedModule {
|
|
|
|
//// export var x = 0;
|
|
|
|
//// }
|
|
|
|
////
|
|
|
|
//// var v = /*valueReference*/ 0;
|
|
|
|
//// var t :/*typeReference*/;
|
|
|
|
////}
|
|
|
|
////
|
|
|
|
////// Add some new items to the module
|
|
|
|
////module TestModule {
|
|
|
|
//// var localVariable2 = "";
|
2018-10-29 18:03:25 +01:00
|
|
|
//// export var exportedVariable2 = 0;
|
2014-07-13 01:04:16 +02:00
|
|
|
////
|
|
|
|
//// function localFunction2() { }
|
|
|
|
//// export function exportedFunction2() { }
|
|
|
|
////
|
|
|
|
//// class localClass2 { }
|
|
|
|
//// export class exportedClass2 { }
|
|
|
|
////
|
|
|
|
//// interface localInterface2 {}
|
|
|
|
//// export interface exportedInterface2 {}
|
|
|
|
////
|
2018-01-17 21:05:31 +01:00
|
|
|
//// module localModule2 {
|
2014-07-13 01:04:16 +02:00
|
|
|
//// export var x = 0;
|
|
|
|
//// }
|
|
|
|
//// export module exportedModule2 {
|
|
|
|
//// export var x = 0;
|
|
|
|
//// }
|
|
|
|
////}
|
|
|
|
////var globalVar: string = "";
|
|
|
|
////function globalFunction() { }
|
|
|
|
////
|
|
|
|
////class TestClass {
|
|
|
|
//// property: number;
|
|
|
|
//// method() { }
|
|
|
|
//// staticMethod() { }
|
|
|
|
//// testMethod(param: number) {
|
|
|
|
//// var localVar = 0;
|
|
|
|
//// function localFunction() {};
|
|
|
|
//// /*insideMethod*/
|
|
|
|
//// }
|
|
|
|
////}
|
|
|
|
|
2018-10-29 18:03:25 +01:00
|
|
|
verify.completions(
|
|
|
|
{
|
|
|
|
marker: "valueReference",
|
|
|
|
includes: [
|
|
|
|
"localVariable",
|
|
|
|
"exportedVariable",
|
|
|
|
"localFunction",
|
|
|
|
"exportedFunction",
|
|
|
|
"localClass",
|
|
|
|
"exportedClass",
|
|
|
|
"localModule",
|
|
|
|
"exportedModule",
|
|
|
|
"exportedVariable2",
|
|
|
|
"exportedFunction2",
|
|
|
|
"exportedClass2",
|
|
|
|
"exportedModule2",
|
|
|
|
],
|
|
|
|
isNewIdentifierLocation: true, // TODO: Should not be a new identifier location
|
|
|
|
},
|
|
|
|
{
|
|
|
|
marker: "typeReference",
|
|
|
|
includes: [
|
|
|
|
"localInterface",
|
|
|
|
"exportedInterface",
|
|
|
|
"localClass",
|
|
|
|
"exportedClass",
|
|
|
|
"exportedClass2",
|
|
|
|
],
|
|
|
|
excludes: [
|
|
|
|
"localModule",
|
|
|
|
"exportedModule",
|
|
|
|
"exportedModule2",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
marker: "insideMethod",
|
|
|
|
includes: [
|
|
|
|
"globalVar",
|
|
|
|
"globalFunction",
|
|
|
|
"param",
|
|
|
|
"localVar",
|
|
|
|
"localFunction",
|
|
|
|
],
|
|
|
|
excludes: [
|
|
|
|
"property",
|
|
|
|
"testMethod",
|
|
|
|
"staticMethod",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
);
|