mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-11 19:27:35 -06:00
Merge pull request #2187 from Microsoft/CRLF
Use CRLF in our code, not LF.
This commit is contained in:
commit
18b72577ab
@ -1,4 +1,4 @@
|
||||
/// <reference path='..\services\services.ts' />
|
||||
/// <reference path='..\services\services.ts' />
|
||||
/// <reference path='..\services\shims.ts' />
|
||||
/// <reference path='..\server\client.ts' />
|
||||
/// <reference path='harness.ts' />
|
||||
|
||||
@ -295,8 +295,8 @@ module ts.SignatureHelp {
|
||||
var tagExpression = <TaggedTemplateExpression>templateExpression.parent;
|
||||
Debug.assert(templateExpression.kind === SyntaxKind.TemplateExpression);
|
||||
|
||||
// If we're just after a template tail, don't show signature help.
|
||||
if (node.kind === SyntaxKind.TemplateTail && !isInsideTemplateLiteral(<LiteralExpression>node, position)) {
|
||||
// If we're just after a template tail, don't show signature help.
|
||||
if (node.kind === SyntaxKind.TemplateTail && !isInsideTemplateLiteral(<LiteralExpression>node, position)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// /**/module mAmbient {
|
||||
//// module m3 { }
|
||||
//// }
|
||||
|
||||
goTo.marker('');
|
||||
edit.insert("declare ");
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// /**/module mAmbient {
|
||||
//// module m3 { }
|
||||
//// }
|
||||
|
||||
goTo.marker('');
|
||||
edit.insert("declare ");
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// class C {
|
||||
//// set foo(value) { }
|
||||
//// /**/
|
||||
//// }
|
||||
|
||||
goTo.marker();
|
||||
edit.insert("set foo(value) { }");
|
||||
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// class C {
|
||||
//// set foo(value) { }
|
||||
//// /**/
|
||||
//// }
|
||||
|
||||
goTo.marker();
|
||||
edit.insert("set foo(value) { }");
|
||||
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// class Foo {
|
||||
//// constructor() { }
|
||||
//// constructor() { }
|
||||
//// /**/
|
||||
//// }
|
||||
|
||||
goTo.marker();
|
||||
var func = 'fn() { }';
|
||||
edit.insert(func);
|
||||
verify.numberOfErrorsInCurrentFile(2);
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// class Foo {
|
||||
//// constructor() { }
|
||||
//// constructor() { }
|
||||
//// /**/
|
||||
//// }
|
||||
|
||||
goTo.marker();
|
||||
var func = 'fn() { }';
|
||||
edit.insert(func);
|
||||
verify.numberOfErrorsInCurrentFile(2);
|
||||
|
||||
@ -1,21 +1,21 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////
|
||||
//// interface Intersection {
|
||||
//// /*insertHere*/
|
||||
//// }
|
||||
//// interface Scene { }
|
||||
//// class /*className*/Sphere {
|
||||
//// constructor() {
|
||||
//// }
|
||||
//// }
|
||||
|
||||
goTo.marker('className');
|
||||
verify.quickInfoIs('class Sphere');
|
||||
|
||||
goTo.marker('insertHere');
|
||||
edit.insert("ray: Ray;");
|
||||
|
||||
goTo.marker('className');
|
||||
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////
|
||||
//// interface Intersection {
|
||||
//// /*insertHere*/
|
||||
//// }
|
||||
//// interface Scene { }
|
||||
//// class /*className*/Sphere {
|
||||
//// constructor() {
|
||||
//// }
|
||||
//// }
|
||||
|
||||
goTo.marker('className');
|
||||
verify.quickInfoIs('class Sphere');
|
||||
|
||||
goTo.marker('insertHere');
|
||||
edit.insert("ray: Ray;");
|
||||
|
||||
goTo.marker('className');
|
||||
|
||||
verify.quickInfoIs('class Sphere');
|
||||
@ -1,14 +1,14 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// interface A {
|
||||
//// a: number;
|
||||
//// }
|
||||
//// /**/
|
||||
//// interface C<T extends A> {
|
||||
//// x: T;
|
||||
//// }
|
||||
////
|
||||
//// var v2: C<B>; // should not work
|
||||
|
||||
goTo.marker();
|
||||
edit.insert("interface B { b: string; }");
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// interface A {
|
||||
//// a: number;
|
||||
//// }
|
||||
//// /**/
|
||||
//// interface C<T extends A> {
|
||||
//// x: T;
|
||||
//// }
|
||||
////
|
||||
//// var v2: C<B>; // should not work
|
||||
|
||||
goTo.marker();
|
||||
edit.insert("interface B { b: string; }");
|
||||
|
||||
@ -1,20 +1,20 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////
|
||||
//// module /*check*/Mod{
|
||||
//// }
|
||||
////
|
||||
//// interface MyInterface {
|
||||
//// /*insert*/
|
||||
//// }
|
||||
|
||||
edit.disableFormatting();
|
||||
|
||||
goTo.marker('check');
|
||||
verify.quickInfoIs('module Mod');
|
||||
|
||||
goTo.marker('insert');
|
||||
edit.insert("x: number;\n");
|
||||
|
||||
goTo.marker('check');
|
||||
verify.quickInfoIs('module Mod');
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////
|
||||
//// module /*check*/Mod{
|
||||
//// }
|
||||
////
|
||||
//// interface MyInterface {
|
||||
//// /*insert*/
|
||||
//// }
|
||||
|
||||
edit.disableFormatting();
|
||||
|
||||
goTo.marker('check');
|
||||
verify.quickInfoIs('module Mod');
|
||||
|
||||
goTo.marker('insert');
|
||||
edit.insert("x: number;\n");
|
||||
|
||||
goTo.marker('check');
|
||||
verify.quickInfoIs('module Mod');
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// interface Comparable<T> {
|
||||
//// /*1*/}
|
||||
//// interface Comparer {
|
||||
//// }
|
||||
//// var max2: Comparer = (x, y) => { return (x.compareTo(y) > 0) ? x : y };
|
||||
//// var maxResult = max2(1);
|
||||
|
||||
edit.disableFormatting();
|
||||
|
||||
goTo.marker('1');
|
||||
|
||||
edit.insert(" compareTo(): number;\n");
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// interface Comparable<T> {
|
||||
//// /*1*/}
|
||||
//// interface Comparer {
|
||||
//// }
|
||||
//// var max2: Comparer = (x, y) => { return (x.compareTo(y) > 0) ? x : y };
|
||||
//// var maxResult = max2(1);
|
||||
|
||||
edit.disableFormatting();
|
||||
|
||||
goTo.marker('1');
|
||||
|
||||
edit.insert(" compareTo(): number;\n");
|
||||
|
||||
@ -1,24 +1,24 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////
|
||||
//// //_modes. // produces an internal error - please implement in derived class
|
||||
////
|
||||
//// module editor {
|
||||
//// import modes = _modes;
|
||||
////
|
||||
//// var i : modes.IMode;
|
||||
////
|
||||
//// // If you just use p1:modes, the compiler accepts it - should be an error
|
||||
//// class Bg {
|
||||
//// constructor(p1: modes, p2: modes.Mode) {// should be an error on p2 - it's not exported
|
||||
//// /*1*/}
|
||||
////
|
||||
//// }
|
||||
//// }
|
||||
////
|
||||
|
||||
edit.disableFormatting();
|
||||
|
||||
goTo.marker('1');
|
||||
|
||||
edit.insert(" var x:modes.Mode;\n");
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////
|
||||
//// //_modes. // produces an internal error - please implement in derived class
|
||||
////
|
||||
//// module editor {
|
||||
//// import modes = _modes;
|
||||
////
|
||||
//// var i : modes.IMode;
|
||||
////
|
||||
//// // If you just use p1:modes, the compiler accepts it - should be an error
|
||||
//// class Bg {
|
||||
//// constructor(p1: modes, p2: modes.Mode) {// should be an error on p2 - it's not exported
|
||||
//// /*1*/}
|
||||
////
|
||||
//// }
|
||||
//// }
|
||||
////
|
||||
|
||||
edit.disableFormatting();
|
||||
|
||||
goTo.marker('1');
|
||||
|
||||
edit.insert(" var x:modes.Mode;\n");
|
||||
|
||||
@ -1,25 +1,25 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////class TestClass {
|
||||
//// private testMethod1(param1: boolean,
|
||||
//// param2/*1*/: boolean) {
|
||||
//// }
|
||||
////
|
||||
//// public testMethod2(a: number, b: number, c: number) {
|
||||
//// if (a === b) {
|
||||
//// }
|
||||
//// else if (a != c &&
|
||||
//// a/*2*/ > b &&
|
||||
//// b/*3*/ < c) {
|
||||
//// }
|
||||
////
|
||||
//// }
|
||||
////}
|
||||
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.indentationIs(8);
|
||||
goTo.marker("2");
|
||||
verify.indentationIs(12);
|
||||
goTo.marker("3");
|
||||
verify.indentationIs(12);
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////class TestClass {
|
||||
//// private testMethod1(param1: boolean,
|
||||
//// param2/*1*/: boolean) {
|
||||
//// }
|
||||
////
|
||||
//// public testMethod2(a: number, b: number, c: number) {
|
||||
//// if (a === b) {
|
||||
//// }
|
||||
//// else if (a != c &&
|
||||
//// a/*2*/ > b &&
|
||||
//// b/*3*/ < c) {
|
||||
//// }
|
||||
////
|
||||
//// }
|
||||
////}
|
||||
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.indentationIs(8);
|
||||
goTo.marker("2");
|
||||
verify.indentationIs(12);
|
||||
goTo.marker("3");
|
||||
verify.indentationIs(12);
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////module Test1 {
|
||||
//// class Person {
|
||||
//// children: string[];
|
||||
//// constructor(public name: string, children: string[]) {
|
||||
//// /**/
|
||||
//// }
|
||||
//// }
|
||||
////}
|
||||
|
||||
goTo.marker();
|
||||
var text = "this.children = ch";
|
||||
edit.insert(text);
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////module Test1 {
|
||||
//// class Person {
|
||||
//// children: string[];
|
||||
//// constructor(public name: string, children: string[]) {
|
||||
//// /**/
|
||||
//// }
|
||||
//// }
|
||||
////}
|
||||
|
||||
goTo.marker();
|
||||
var text = "this.children = ch";
|
||||
edit.insert(text);
|
||||
verify.completionListContains("children", "(parameter) children: string[]");
|
||||
@ -1,8 +1,8 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// function f() {
|
||||
//// var x = /**/arguments[0];
|
||||
//// }
|
||||
|
||||
goTo.marker();
|
||||
verify.quickInfoExists();
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// function f() {
|
||||
//// var x = /**/arguments[0];
|
||||
//// }
|
||||
|
||||
goTo.marker();
|
||||
verify.quickInfoExists();
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// var a = [];
|
||||
//// a.concat("hello"/*1*/);
|
||||
////
|
||||
//// a.concat('Hello');
|
||||
////
|
||||
//// var b = new Array();
|
||||
//// b.concat('hello');
|
||||
////
|
||||
|
||||
edit.disableFormatting();
|
||||
|
||||
goTo.marker('1');
|
||||
|
||||
edit.insert(", 'world'");
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// var a = [];
|
||||
//// a.concat("hello"/*1*/);
|
||||
////
|
||||
//// a.concat('Hello');
|
||||
////
|
||||
//// var b = new Array();
|
||||
//// b.concat('hello');
|
||||
////
|
||||
|
||||
edit.disableFormatting();
|
||||
|
||||
goTo.marker('1');
|
||||
|
||||
edit.insert(", 'world'");
|
||||
|
||||
@ -1,26 +1,26 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// a.concat(/*2*/"hello"/*1*/, 'world');
|
||||
////
|
||||
//// a.concat(/*3*/'Hello');
|
||||
////
|
||||
//// var b = new Array/*4*/<>();
|
||||
//// b.concat('hello');
|
||||
////
|
||||
|
||||
edit.disableFormatting();
|
||||
|
||||
goTo.marker('1');
|
||||
|
||||
edit.deleteAtCaret(9);
|
||||
|
||||
goTo.marker('3');
|
||||
|
||||
edit.deleteAtCaret(7);
|
||||
|
||||
goTo.marker('2');
|
||||
|
||||
edit.deleteAtCaret(7);
|
||||
|
||||
goTo.marker('4');
|
||||
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// a.concat(/*2*/"hello"/*1*/, 'world');
|
||||
////
|
||||
//// a.concat(/*3*/'Hello');
|
||||
////
|
||||
//// var b = new Array/*4*/<>();
|
||||
//// b.concat('hello');
|
||||
////
|
||||
|
||||
edit.disableFormatting();
|
||||
|
||||
goTo.marker('1');
|
||||
|
||||
edit.deleteAtCaret(9);
|
||||
|
||||
goTo.marker('3');
|
||||
|
||||
edit.deleteAtCaret(7);
|
||||
|
||||
goTo.marker('2');
|
||||
|
||||
edit.deleteAtCaret(7);
|
||||
|
||||
goTo.marker('4');
|
||||
|
||||
|
||||
@ -1,28 +1,28 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////module TestModule {
|
||||
/////**/
|
||||
////}
|
||||
goTo.marker("");
|
||||
edit.paste(" class TestClass{\r\n\
|
||||
private foo;\r\n\
|
||||
public testMethod( )\r\n\
|
||||
{}\r\n\
|
||||
}");
|
||||
// We're missing scenarios of formatting option settings due to bug 693273 - [TypeScript] Need to improve fourslash support for formatting options.
|
||||
// Missing scenario ** Uncheck Tools->Options->Text Editor->TypeScript->Formatting->General->Format on paste **
|
||||
//verify.currentFileContentIs("module TestModule {\r\n\
|
||||
// class TestClass{\r\n\
|
||||
//private foo;\r\n\
|
||||
//public testMethod( )\r\n\
|
||||
//{}\r\n\
|
||||
//}\r\n\
|
||||
//}");
|
||||
// Missing scenario ** Check Tools->Options->Text Editor->TypeScript->Formatting->General->Format on paste **
|
||||
verify.currentFileContentIs("module TestModule {\r\n\
|
||||
class TestClass {\r\n\
|
||||
private foo;\r\n\
|
||||
public testMethod()\r\n\
|
||||
{ }\r\n\
|
||||
}\r\n\
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////module TestModule {
|
||||
/////**/
|
||||
////}
|
||||
goTo.marker("");
|
||||
edit.paste(" class TestClass{\r\n\
|
||||
private foo;\r\n\
|
||||
public testMethod( )\r\n\
|
||||
{}\r\n\
|
||||
}");
|
||||
// We're missing scenarios of formatting option settings due to bug 693273 - [TypeScript] Need to improve fourslash support for formatting options.
|
||||
// Missing scenario ** Uncheck Tools->Options->Text Editor->TypeScript->Formatting->General->Format on paste **
|
||||
//verify.currentFileContentIs("module TestModule {\r\n\
|
||||
// class TestClass{\r\n\
|
||||
//private foo;\r\n\
|
||||
//public testMethod( )\r\n\
|
||||
//{}\r\n\
|
||||
//}\r\n\
|
||||
//}");
|
||||
// Missing scenario ** Check Tools->Options->Text Editor->TypeScript->Formatting->General->Format on paste **
|
||||
verify.currentFileContentIs("module TestModule {\r\n\
|
||||
class TestClass {\r\n\
|
||||
private foo;\r\n\
|
||||
public testMethod()\r\n\
|
||||
{ }\r\n\
|
||||
}\r\n\
|
||||
}");
|
||||
@ -19,7 +19,7 @@
|
||||
//// set greetings(greetings: string) {
|
||||
//// this.greeting = greetings;
|
||||
//// }
|
||||
////}
|
||||
////}
|
||||
////class Greeter2 {
|
||||
////}
|
||||
////class Greeter1
|
||||
@ -45,9 +45,9 @@
|
||||
//// {
|
||||
//// this.greeting = greetings;
|
||||
//// }
|
||||
////}
|
||||
////}
|
||||
////class Greeter12
|
||||
////{
|
||||
////}
|
||||
|
||||
|
||||
verify.baselineCurrentFileBreakpointLocations();
|
||||
@ -9,6 +9,6 @@
|
||||
//// private val;
|
||||
//// static x: number;
|
||||
//// static fn(a: number, ...b:string[]);
|
||||
////}
|
||||
////}
|
||||
|
||||
verify.baselineCurrentFileBreakpointLocations();
|
||||
@ -3,37 +3,37 @@
|
||||
// @BaselineFile: bpSpan_classes.baseline
|
||||
// @Filename: bpSpan_classes.ts
|
||||
////module Foo.Bar {
|
||||
//// "use strict";
|
||||
////
|
||||
//// "use strict";
|
||||
////
|
||||
//// class Greeter {
|
||||
//// constructor(public greeting: string) {
|
||||
//// }
|
||||
////
|
||||
////
|
||||
//// greet() {
|
||||
//// return "<h1>" + this.greeting + "</h1>";
|
||||
//// }
|
||||
//// }
|
||||
////
|
||||
////
|
||||
//// }
|
||||
////
|
||||
////
|
||||
//// function foo(greeting: string): Greeter {
|
||||
//// return new Greeter(greeting);
|
||||
//// }
|
||||
////
|
||||
//// var greeter = new Greeter("Hello, world!");
|
||||
//// var str = greeter.greet();
|
||||
////
|
||||
//// }
|
||||
////
|
||||
//// var greeter = new Greeter("Hello, world!");
|
||||
//// var str = greeter.greet();
|
||||
////
|
||||
//// function foo2(greeting: string, ...restGreetings /* more greeting */: string[]) {
|
||||
//// var greeters: Greeter[] = []; /* inline block comment */
|
||||
//// greeters[0] = new Greeter(greeting);
|
||||
//// for (var i = 0; i < restGreetings.length; i++) {
|
||||
//// greeters.push(new Greeter(restGreetings[i]));
|
||||
//// }
|
||||
////
|
||||
////
|
||||
//// return greeters;
|
||||
//// }
|
||||
////
|
||||
//// var b = foo2("Hello", "World", "!");
|
||||
//// // This is simple signle line comment
|
||||
//// }
|
||||
////
|
||||
//// var b = foo2("Hello", "World", "!");
|
||||
//// // This is simple signle line comment
|
||||
//// for (var j = 0; j < b.length; j++) {
|
||||
//// b[j].greet();
|
||||
//// }
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////class Foo {
|
||||
//// constructor() { var x = [1, 2, 3 }
|
||||
////}
|
||||
/////**/
|
||||
////var bar = new Foo();
|
||||
|
||||
verify.not.errorExistsAfterMarker();
|
||||
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////class Foo {
|
||||
//// constructor() { var x = [1, 2, 3 }
|
||||
////}
|
||||
/////**/
|
||||
////var bar = new Foo();
|
||||
|
||||
verify.not.errorExistsAfterMarker();
|
||||
|
||||
|
||||
@ -11,8 +11,8 @@
|
||||
////}
|
||||
|
||||
////var i: I;
|
||||
////i.foo(/**/
|
||||
|
||||
goTo.marker();
|
||||
verify.signatureHelpCountIs(2);
|
||||
////i.foo(/**/
|
||||
|
||||
goTo.marker();
|
||||
verify.signatureHelpCountIs(2);
|
||||
verify.currentParameterSpanIs('x: string');
|
||||
@ -1,9 +1,9 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////class Foo/*1*//*2*/ { public Bar() { } }
|
||||
|
||||
goTo.marker("1");
|
||||
edit.backspace(3);
|
||||
edit.insert("Pizza");
|
||||
verify.currentLineContentIs("class Pizza { public Bar() { } }");
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////class Foo/*1*//*2*/ { public Bar() { } }
|
||||
|
||||
goTo.marker("1");
|
||||
edit.backspace(3);
|
||||
edit.insert("Pizza");
|
||||
verify.currentLineContentIs("class Pizza { public Bar() { } }");
|
||||
verify.not.errorExistsAfterMarker("2");
|
||||
@ -1,8 +1,8 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////class Foo {
|
||||
//// constructor(/* /**/ */) { }
|
||||
////}
|
||||
|
||||
goTo.marker();
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////class Foo {
|
||||
//// constructor(/* /**/ */) { }
|
||||
////}
|
||||
|
||||
goTo.marker();
|
||||
verify.completionListIsEmpty();
|
||||
@ -1,16 +1,16 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////module Bar {
|
||||
//// export class Bleah {
|
||||
//// }
|
||||
//// export class Foo extends /**/Bleah {
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////function Blah(x: Bar.Bleah) {
|
||||
////}
|
||||
|
||||
goTo.marker();
|
||||
verify.completionListContains("Bar");
|
||||
verify.completionListContains("Bleah");
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////module Bar {
|
||||
//// export class Bleah {
|
||||
//// }
|
||||
//// export class Foo extends /**/Bleah {
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////function Blah(x: Bar.Bleah) {
|
||||
////}
|
||||
|
||||
goTo.marker();
|
||||
verify.completionListContains("Bar");
|
||||
verify.completionListContains("Bleah");
|
||||
verify.completionListContains("Foo");
|
||||
@ -1,18 +1,18 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////module M {
|
||||
//// export class C { public pub = 0; private priv = 1; }
|
||||
//// export var V = 0;
|
||||
////}
|
||||
////
|
||||
////
|
||||
////var c = new M.C();
|
||||
////
|
||||
////c. // test on c.
|
||||
////
|
||||
//////Test for comment
|
||||
//////c./**/
|
||||
|
||||
goTo.marker();
|
||||
verify.completionListIsEmpty();
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////module M {
|
||||
//// export class C { public pub = 0; private priv = 1; }
|
||||
//// export var V = 0;
|
||||
////}
|
||||
////
|
||||
////
|
||||
////var c = new M.C();
|
||||
////
|
||||
////c. // test on c.
|
||||
////
|
||||
//////Test for comment
|
||||
//////c./**/
|
||||
|
||||
goTo.marker();
|
||||
verify.completionListIsEmpty();
|
||||
verify.memberListIsEmpty();
|
||||
@ -1,7 +1,7 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////// /**/
|
||||
////var
|
||||
|
||||
goTo.marker();
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////// /**/
|
||||
////var
|
||||
|
||||
goTo.marker();
|
||||
verify.completionListIsEmpty();
|
||||
@ -1,18 +1,18 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////module M {
|
||||
//// export class C { public pub = 0; private priv = 1; }
|
||||
//// export var V = 0;
|
||||
////}
|
||||
////
|
||||
////
|
||||
////var c = new M.C();
|
||||
////
|
||||
////c. // test on c.
|
||||
////
|
||||
//////Test for comment
|
||||
//////c. /**/
|
||||
|
||||
goTo.marker();
|
||||
verify.completionListIsEmpty();
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////module M {
|
||||
//// export class C { public pub = 0; private priv = 1; }
|
||||
//// export var V = 0;
|
||||
////}
|
||||
////
|
||||
////
|
||||
////var c = new M.C();
|
||||
////
|
||||
////c. // test on c.
|
||||
////
|
||||
//////Test for comment
|
||||
//////c. /**/
|
||||
|
||||
goTo.marker();
|
||||
verify.completionListIsEmpty();
|
||||
verify.memberListIsEmpty();
|
||||
@ -1,14 +1,14 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////module Bar {
|
||||
//// export class Bleah {
|
||||
//// }
|
||||
//// export class Foo extends Bleah {
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////function Blah(x: /**/Bar.Bleah) {
|
||||
////}
|
||||
|
||||
goTo.marker();
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////module Bar {
|
||||
//// export class Bleah {
|
||||
//// }
|
||||
//// export class Foo extends Bleah {
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////function Blah(x: /**/Bar.Bleah) {
|
||||
////}
|
||||
|
||||
goTo.marker();
|
||||
verify.completionListContains("Bar");
|
||||
@ -1,22 +1,22 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
//// var [x/*variable1*/
|
||||
|
||||
//// var [x, y/*variable2*/
|
||||
|
||||
//// var [./*variable3*/
|
||||
|
||||
//// var [x, ...z/*variable4*/
|
||||
|
||||
//// var {x/*variable5*/
|
||||
|
||||
//// var {x, y/*variable6*/
|
||||
|
||||
//// function func1({ a/*parameter1*/
|
||||
|
||||
//// function func2({ a, b/*parameter2*/
|
||||
|
||||
test.markers().forEach((m) => {
|
||||
goTo.position(m.position, m.fileName);
|
||||
verify.completionListIsEmpty();
|
||||
});
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
//// var [x/*variable1*/
|
||||
|
||||
//// var [x, y/*variable2*/
|
||||
|
||||
//// var [./*variable3*/
|
||||
|
||||
//// var [x, ...z/*variable4*/
|
||||
|
||||
//// var {x/*variable5*/
|
||||
|
||||
//// var {x, y/*variable6*/
|
||||
|
||||
//// function func1({ a/*parameter1*/
|
||||
|
||||
//// function func2({ a, b/*parameter2*/
|
||||
|
||||
test.markers().forEach((m) => {
|
||||
goTo.position(m.position, m.fileName);
|
||||
verify.completionListIsEmpty();
|
||||
});
|
||||
|
||||
@ -1,34 +1,34 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////var x = a/*var1*/
|
||||
|
||||
////var x = (b/*var2*/
|
||||
|
||||
////var x = (c, d/*var3*/
|
||||
|
||||
//// var y : any = "", x = a/*var4*/
|
||||
|
||||
//// var y : any = "", x = (a/*var5*/
|
||||
|
||||
////class C{}
|
||||
////var y = new C(
|
||||
|
||||
//// class C{}
|
||||
//// var y = new C(0, /*var7*/
|
||||
|
||||
////var y = [/*var8*/
|
||||
|
||||
////var y = [0, /*var9*/
|
||||
|
||||
////var y = `${/*var10*/
|
||||
|
||||
////var y = `${10} dd ${ /*var11*/
|
||||
|
||||
////var y = 10; y=/*var12*/
|
||||
|
||||
test.markers().forEach((m) => {
|
||||
goTo.position(m.position, m.fileName);
|
||||
verify.completionListAllowsNewIdentifier();
|
||||
});
|
||||
|
||||
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////var x = a/*var1*/
|
||||
|
||||
////var x = (b/*var2*/
|
||||
|
||||
////var x = (c, d/*var3*/
|
||||
|
||||
//// var y : any = "", x = a/*var4*/
|
||||
|
||||
//// var y : any = "", x = (a/*var5*/
|
||||
|
||||
////class C{}
|
||||
////var y = new C(
|
||||
|
||||
//// class C{}
|
||||
//// var y = new C(0, /*var7*/
|
||||
|
||||
////var y = [/*var8*/
|
||||
|
||||
////var y = [0, /*var9*/
|
||||
|
||||
////var y = `${/*var10*/
|
||||
|
||||
////var y = `${10} dd ${ /*var11*/
|
||||
|
||||
////var y = 10; y=/*var12*/
|
||||
|
||||
test.markers().forEach((m) => {
|
||||
goTo.position(m.position, m.fileName);
|
||||
verify.completionListAllowsNewIdentifier();
|
||||
});
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/// <reference path="fourslash.ts"/>
|
||||
/// <reference path="fourslash.ts"/>
|
||||
|
||||
////class Foo {
|
||||
//// doStuff(): number { return 0; }
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////class Foo { static fun() { }; }
|
||||
|
||||
////Foo./**/;
|
||||
/////*1*/var bar;
|
||||
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////class Foo { static fun() { }; }
|
||||
|
||||
////Foo./**/;
|
||||
/////*1*/var bar;
|
||||
|
||||
// this line triggers a semantic/syntactic error check, remove line when 788570 is fixed
|
||||
edit.insert('');
|
||||
|
||||
goTo.marker();
|
||||
verify.memberListContains("fun");
|
||||
edit.insert('');
|
||||
|
||||
goTo.marker();
|
||||
verify.memberListContains("fun");
|
||||
verify.not.errorExistsAfterMarker("1");
|
||||
@ -1,12 +1,12 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////class Foo { static bar() { return "x"; } }
|
||||
////var baz = Foo/**/;
|
||||
/////*1*/baz.concat("y");
|
||||
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////class Foo { static bar() { return "x"; } }
|
||||
////var baz = Foo/**/;
|
||||
/////*1*/baz.concat("y");
|
||||
|
||||
// this line triggers a semantic/syntactic error check, remove line when 788570 is fixed
|
||||
edit.insert('');
|
||||
|
||||
goTo.marker();
|
||||
edit.insert(".b");
|
||||
verify.not.errorExistsAfterMarker("1");
|
||||
edit.insert('');
|
||||
|
||||
goTo.marker();
|
||||
edit.insert(".b");
|
||||
verify.not.errorExistsAfterMarker("1");
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////function fnc1() {
|
||||
//// var bar = 1;
|
||||
//// function foob(){ }
|
||||
////}
|
||||
////
|
||||
////fnc1./**/
|
||||
|
||||
goTo.marker();
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////function fnc1() {
|
||||
//// var bar = 1;
|
||||
//// function foob(){ }
|
||||
////}
|
||||
////
|
||||
////fnc1./**/
|
||||
|
||||
goTo.marker();
|
||||
verify.memberListContains('arguments', '(property) Function.arguments: any');
|
||||
@ -1,63 +1,63 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class Base {
|
||||
//// private privateMethod() { }
|
||||
//// private privateProperty;
|
||||
////
|
||||
//// protected protectedMethod() { }
|
||||
//// protected protectedProperty;
|
||||
////
|
||||
//// public publicMethod() { }
|
||||
//// public publicProperty;
|
||||
////
|
||||
//// protected protectedOverriddenMethod() { }
|
||||
//// protected protectedOverriddenProperty;
|
||||
////
|
||||
//// test() {
|
||||
//// this./*1*/;
|
||||
////
|
||||
//// var b: Base;
|
||||
//// var c: C1;
|
||||
////
|
||||
//// b./*2*/;
|
||||
//// c./*3*/;
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////class C1 extends Base {
|
||||
//// protected protectedOverriddenMethod() { }
|
||||
//// protected protectedOverriddenProperty;
|
||||
////}
|
||||
|
||||
|
||||
// Same class, everything is visible
|
||||
goTo.marker("1");
|
||||
verify.memberListContains('privateMethod');
|
||||
verify.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
goTo.marker("2");
|
||||
verify.memberListContains('privateMethod');
|
||||
verify.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
// Can not access protected properties overridden in subclass
|
||||
goTo.marker("3");
|
||||
verify.memberListContains('privateMethod');
|
||||
verify.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.not.memberListContains('protectedOverriddenMethod');
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class Base {
|
||||
//// private privateMethod() { }
|
||||
//// private privateProperty;
|
||||
////
|
||||
//// protected protectedMethod() { }
|
||||
//// protected protectedProperty;
|
||||
////
|
||||
//// public publicMethod() { }
|
||||
//// public publicProperty;
|
||||
////
|
||||
//// protected protectedOverriddenMethod() { }
|
||||
//// protected protectedOverriddenProperty;
|
||||
////
|
||||
//// test() {
|
||||
//// this./*1*/;
|
||||
////
|
||||
//// var b: Base;
|
||||
//// var c: C1;
|
||||
////
|
||||
//// b./*2*/;
|
||||
//// c./*3*/;
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////class C1 extends Base {
|
||||
//// protected protectedOverriddenMethod() { }
|
||||
//// protected protectedOverriddenProperty;
|
||||
////}
|
||||
|
||||
|
||||
// Same class, everything is visible
|
||||
goTo.marker("1");
|
||||
verify.memberListContains('privateMethod');
|
||||
verify.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
goTo.marker("2");
|
||||
verify.memberListContains('privateMethod');
|
||||
verify.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
// Can not access protected properties overridden in subclass
|
||||
goTo.marker("3");
|
||||
verify.memberListContains('privateMethod');
|
||||
verify.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.not.memberListContains('protectedOverriddenMethod');
|
||||
verify.not.memberListContains('protectedOverriddenProperty');
|
||||
@ -1,76 +1,76 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class Base {
|
||||
//// private privateMethod() { }
|
||||
//// private privateProperty;
|
||||
////
|
||||
//// protected protectedMethod() { }
|
||||
//// protected protectedProperty;
|
||||
////
|
||||
//// public publicMethod() { }
|
||||
//// public publicProperty;
|
||||
////
|
||||
//// protected protectedOverriddenMethod() { }
|
||||
//// protected protectedOverriddenProperty;
|
||||
////}
|
||||
////
|
||||
////class C1 extends Base {
|
||||
//// protected protectedOverriddenMethod() { }
|
||||
//// protected protectedOverriddenProperty;
|
||||
////
|
||||
//// test() {
|
||||
//// this./*1*/;
|
||||
//// super./*2*/;
|
||||
////
|
||||
//// var b: Base;
|
||||
//// var c: C1;
|
||||
////
|
||||
//// b./*3*/;
|
||||
//// c./*4*/;
|
||||
//// }
|
||||
////}
|
||||
|
||||
|
||||
// Same class, everything is visible
|
||||
goTo.marker("1");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
// Can not access properties on super
|
||||
goTo.marker("2");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.not.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.not.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.not.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
// Can not access protected properties through base class
|
||||
goTo.marker("3");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.not.memberListContains('protectedMethod');
|
||||
verify.not.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.not.memberListContains('protectedOverriddenMethod');
|
||||
verify.not.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
// Same class, everything is visible
|
||||
goTo.marker("4");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.memberListContains('protectedOverriddenProperty');
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class Base {
|
||||
//// private privateMethod() { }
|
||||
//// private privateProperty;
|
||||
////
|
||||
//// protected protectedMethod() { }
|
||||
//// protected protectedProperty;
|
||||
////
|
||||
//// public publicMethod() { }
|
||||
//// public publicProperty;
|
||||
////
|
||||
//// protected protectedOverriddenMethod() { }
|
||||
//// protected protectedOverriddenProperty;
|
||||
////}
|
||||
////
|
||||
////class C1 extends Base {
|
||||
//// protected protectedOverriddenMethod() { }
|
||||
//// protected protectedOverriddenProperty;
|
||||
////
|
||||
//// test() {
|
||||
//// this./*1*/;
|
||||
//// super./*2*/;
|
||||
////
|
||||
//// var b: Base;
|
||||
//// var c: C1;
|
||||
////
|
||||
//// b./*3*/;
|
||||
//// c./*4*/;
|
||||
//// }
|
||||
////}
|
||||
|
||||
|
||||
// Same class, everything is visible
|
||||
goTo.marker("1");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
// Can not access properties on super
|
||||
goTo.marker("2");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.not.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.not.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.not.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
// Can not access protected properties through base class
|
||||
goTo.marker("3");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.not.memberListContains('protectedMethod');
|
||||
verify.not.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.not.memberListContains('protectedOverriddenMethod');
|
||||
verify.not.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
// Same class, everything is visible
|
||||
goTo.marker("4");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
@ -1,46 +1,46 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class Base {
|
||||
//// private privateMethod() { }
|
||||
//// private privateProperty;
|
||||
////
|
||||
//// protected protectedMethod() { }
|
||||
//// protected protectedProperty;
|
||||
////
|
||||
//// public publicMethod() { }
|
||||
//// public publicProperty;
|
||||
////
|
||||
//// protected protectedOverriddenMethod() { }
|
||||
//// protected protectedOverriddenProperty;
|
||||
////}
|
||||
////
|
||||
////class C1 extends Base {
|
||||
//// protected protectedOverriddenMethod() { }
|
||||
//// protected protectedOverriddenProperty;
|
||||
////}
|
||||
////
|
||||
//// var b: Base;
|
||||
//// var c: C1;
|
||||
//// b./*1*/;
|
||||
//// c./*2*/;
|
||||
|
||||
// Only public properties are visible outside the class
|
||||
goTo.marker("1");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.not.memberListContains('protectedMethod');
|
||||
verify.not.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.not.memberListContains('protectedOverriddenMethod');
|
||||
verify.not.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
goTo.marker("2");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.not.memberListContains('protectedMethod');
|
||||
verify.not.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.not.memberListContains('protectedOverriddenMethod');
|
||||
verify.not.memberListContains('protectedOverriddenProperty');
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class Base {
|
||||
//// private privateMethod() { }
|
||||
//// private privateProperty;
|
||||
////
|
||||
//// protected protectedMethod() { }
|
||||
//// protected protectedProperty;
|
||||
////
|
||||
//// public publicMethod() { }
|
||||
//// public publicProperty;
|
||||
////
|
||||
//// protected protectedOverriddenMethod() { }
|
||||
//// protected protectedOverriddenProperty;
|
||||
////}
|
||||
////
|
||||
////class C1 extends Base {
|
||||
//// protected protectedOverriddenMethod() { }
|
||||
//// protected protectedOverriddenProperty;
|
||||
////}
|
||||
////
|
||||
//// var b: Base;
|
||||
//// var c: C1;
|
||||
//// b./*1*/;
|
||||
//// c./*2*/;
|
||||
|
||||
// Only public properties are visible outside the class
|
||||
goTo.marker("1");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.not.memberListContains('protectedMethod');
|
||||
verify.not.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.not.memberListContains('protectedOverriddenMethod');
|
||||
verify.not.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
goTo.marker("2");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.not.memberListContains('protectedMethod');
|
||||
verify.not.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.not.memberListContains('protectedOverriddenMethod');
|
||||
verify.not.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
@ -1,34 +1,34 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class Base {
|
||||
//// private privateMethod() { }
|
||||
//// private privateProperty;
|
||||
////
|
||||
//// protected protectedMethod() { }
|
||||
//// protected protectedProperty;
|
||||
////
|
||||
//// public publicMethod() { }
|
||||
//// public publicProperty;
|
||||
////
|
||||
//// protected protectedOverriddenMethod() { }
|
||||
//// protected protectedOverriddenProperty;
|
||||
////}
|
||||
////
|
||||
////class C1 extends Base {
|
||||
//// public protectedOverriddenMethod() { }
|
||||
//// public protectedOverriddenProperty;
|
||||
////}
|
||||
////
|
||||
//// var c: C1;
|
||||
//// c./*1*/
|
||||
|
||||
|
||||
goTo.marker("1");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.not.memberListContains('protectedMethod');
|
||||
verify.not.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.memberListContains('protectedOverriddenProperty');
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class Base {
|
||||
//// private privateMethod() { }
|
||||
//// private privateProperty;
|
||||
////
|
||||
//// protected protectedMethod() { }
|
||||
//// protected protectedProperty;
|
||||
////
|
||||
//// public publicMethod() { }
|
||||
//// public publicProperty;
|
||||
////
|
||||
//// protected protectedOverriddenMethod() { }
|
||||
//// protected protectedOverriddenProperty;
|
||||
////}
|
||||
////
|
||||
////class C1 extends Base {
|
||||
//// public protectedOverriddenMethod() { }
|
||||
//// public protectedOverriddenProperty;
|
||||
////}
|
||||
////
|
||||
//// var c: C1;
|
||||
//// c./*1*/
|
||||
|
||||
|
||||
goTo.marker("1");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.not.memberListContains('protectedMethod');
|
||||
verify.not.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////enum Foo {
|
||||
//// X, Y, '☆'
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
//// bar: any;
|
||||
//// foo(bar: any): any;
|
||||
//// };
|
||||
////object./**/
|
||||
|
||||
goTo.marker();
|
||||
verify.memberListContains("bar", '(property) bar: any');
|
||||
verify.memberListContains("foo", '(method) foo(bar: any): any');
|
||||
////object./**/
|
||||
|
||||
goTo.marker();
|
||||
verify.memberListContains("bar", '(property) bar: any');
|
||||
verify.memberListContains("foo", '(method) foo(bar: any): any');
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
//// module Foo { var testing = ""; test/**/ }
|
||||
|
||||
goTo.marker();
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
//// module Foo { var testing = ""; test/**/ }
|
||||
|
||||
goTo.marker();
|
||||
verify.completionListContains('testing', '(var) testing: string');
|
||||
@ -1,59 +1,59 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class Base {
|
||||
//// private static privateMethod() { }
|
||||
//// private static privateProperty;
|
||||
////
|
||||
//// protected static protectedMethod() { }
|
||||
//// protected static protectedProperty;
|
||||
////
|
||||
//// public static publicMethod() { }
|
||||
//// public static publicProperty;
|
||||
////
|
||||
//// protected static protectedOverriddenMethod() { }
|
||||
//// protected static protectedOverriddenProperty;
|
||||
////
|
||||
//// static test() {
|
||||
//// Base./*1*/;
|
||||
//// this./*2*/;
|
||||
//// C1./*3*/;
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////class C1 extends Base {
|
||||
//// protected static protectedOverriddenMethod() { }
|
||||
//// protected static protectedOverriddenProperty;
|
||||
////}
|
||||
|
||||
|
||||
// Same class, everything is visible
|
||||
goTo.marker("1");
|
||||
verify.memberListContains('privateMethod');
|
||||
verify.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
goTo.marker("2");
|
||||
verify.memberListContains('privateMethod');
|
||||
verify.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
// Can not access protected properties overridden in subclass
|
||||
goTo.marker("3");
|
||||
verify.memberListContains('privateMethod');
|
||||
verify.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.not.memberListContains('protectedOverriddenMethod');
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class Base {
|
||||
//// private static privateMethod() { }
|
||||
//// private static privateProperty;
|
||||
////
|
||||
//// protected static protectedMethod() { }
|
||||
//// protected static protectedProperty;
|
||||
////
|
||||
//// public static publicMethod() { }
|
||||
//// public static publicProperty;
|
||||
////
|
||||
//// protected static protectedOverriddenMethod() { }
|
||||
//// protected static protectedOverriddenProperty;
|
||||
////
|
||||
//// static test() {
|
||||
//// Base./*1*/;
|
||||
//// this./*2*/;
|
||||
//// C1./*3*/;
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////class C1 extends Base {
|
||||
//// protected static protectedOverriddenMethod() { }
|
||||
//// protected static protectedOverriddenProperty;
|
||||
////}
|
||||
|
||||
|
||||
// Same class, everything is visible
|
||||
goTo.marker("1");
|
||||
verify.memberListContains('privateMethod');
|
||||
verify.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
goTo.marker("2");
|
||||
verify.memberListContains('privateMethod');
|
||||
verify.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
// Can not access protected properties overridden in subclass
|
||||
goTo.marker("3");
|
||||
verify.memberListContains('privateMethod');
|
||||
verify.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.not.memberListContains('protectedOverriddenMethod');
|
||||
verify.not.memberListContains('protectedOverriddenProperty');
|
||||
@ -1,70 +1,70 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class Base {
|
||||
//// private static privateMethod() { }
|
||||
//// private static privateProperty;
|
||||
////
|
||||
//// protected static protectedMethod() { }
|
||||
//// protected static protectedProperty;
|
||||
////
|
||||
//// public static publicMethod() { }
|
||||
//// public static publicProperty;
|
||||
////
|
||||
//// protected static protectedOverriddenMethod() { }
|
||||
//// protected static protectedOverriddenProperty;
|
||||
////}
|
||||
////
|
||||
////class C2 extends Base {
|
||||
//// protected static protectedOverriddenMethod() { }
|
||||
//// protected static protectedOverriddenProperty;
|
||||
////
|
||||
//// static test() {
|
||||
//// Base./*1*/;
|
||||
//// C2./*2*/;
|
||||
//// this./*3*/;
|
||||
//// super./*4*/;
|
||||
//// }
|
||||
////}
|
||||
|
||||
|
||||
// Same class, everything is visible
|
||||
goTo.marker("1");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
goTo.marker("2");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
goTo.marker("3");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
// only public and protected methods of the base class are accessible through super
|
||||
goTo.marker("4");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.not.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.not.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class Base {
|
||||
//// private static privateMethod() { }
|
||||
//// private static privateProperty;
|
||||
////
|
||||
//// protected static protectedMethod() { }
|
||||
//// protected static protectedProperty;
|
||||
////
|
||||
//// public static publicMethod() { }
|
||||
//// public static publicProperty;
|
||||
////
|
||||
//// protected static protectedOverriddenMethod() { }
|
||||
//// protected static protectedOverriddenProperty;
|
||||
////}
|
||||
////
|
||||
////class C2 extends Base {
|
||||
//// protected static protectedOverriddenMethod() { }
|
||||
//// protected static protectedOverriddenProperty;
|
||||
////
|
||||
//// static test() {
|
||||
//// Base./*1*/;
|
||||
//// C2./*2*/;
|
||||
//// this./*3*/;
|
||||
//// super./*4*/;
|
||||
//// }
|
||||
////}
|
||||
|
||||
|
||||
// Same class, everything is visible
|
||||
goTo.marker("1");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
goTo.marker("2");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
goTo.marker("3");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
// only public and protected methods of the base class are accessible through super
|
||||
goTo.marker("4");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.not.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.not.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.not.memberListContains('protectedOverriddenProperty');
|
||||
@ -1,45 +1,45 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class Base {
|
||||
//// private static privateMethod() { }
|
||||
//// private static privateProperty;
|
||||
////
|
||||
//// protected static protectedMethod() { }
|
||||
//// protected static protectedProperty;
|
||||
////
|
||||
//// public static publicMethod() { }
|
||||
//// public static publicProperty;
|
||||
////
|
||||
//// protected static protectedOverriddenMethod() { }
|
||||
//// protected static protectedOverriddenProperty;
|
||||
////}
|
||||
////
|
||||
////class C3 extends Base {
|
||||
//// protected static protectedOverriddenMethod() { }
|
||||
//// protected static protectedOverriddenProperty;
|
||||
////}
|
||||
////
|
||||
////Base./*1*/;
|
||||
////C3./*2*/;
|
||||
|
||||
|
||||
// Only public properties are visible outside the class
|
||||
goTo.marker("1");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.not.memberListContains('protectedMethod');
|
||||
verify.not.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.not.memberListContains('protectedOverriddenMethod');
|
||||
verify.not.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
goTo.marker("2");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.not.memberListContains('protectedMethod');
|
||||
verify.not.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.not.memberListContains('protectedOverriddenMethod');
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class Base {
|
||||
//// private static privateMethod() { }
|
||||
//// private static privateProperty;
|
||||
////
|
||||
//// protected static protectedMethod() { }
|
||||
//// protected static protectedProperty;
|
||||
////
|
||||
//// public static publicMethod() { }
|
||||
//// public static publicProperty;
|
||||
////
|
||||
//// protected static protectedOverriddenMethod() { }
|
||||
//// protected static protectedOverriddenProperty;
|
||||
////}
|
||||
////
|
||||
////class C3 extends Base {
|
||||
//// protected static protectedOverriddenMethod() { }
|
||||
//// protected static protectedOverriddenProperty;
|
||||
////}
|
||||
////
|
||||
////Base./*1*/;
|
||||
////C3./*2*/;
|
||||
|
||||
|
||||
// Only public properties are visible outside the class
|
||||
goTo.marker("1");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.not.memberListContains('protectedMethod');
|
||||
verify.not.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.not.memberListContains('protectedOverriddenMethod');
|
||||
verify.not.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
goTo.marker("2");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.not.memberListContains('protectedMethod');
|
||||
verify.not.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.not.memberListContains('protectedOverriddenMethod');
|
||||
verify.not.memberListContains('protectedOverriddenProperty');
|
||||
@ -1,49 +1,49 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class Base {
|
||||
//// private static privateMethod() { }
|
||||
//// private static privateProperty;
|
||||
////
|
||||
//// protected static protectedMethod() { }
|
||||
//// protected static protectedProperty;
|
||||
////
|
||||
//// public static publicMethod() { }
|
||||
//// public static publicProperty;
|
||||
////
|
||||
//// protected static protectedOverriddenMethod() { }
|
||||
//// protected static protectedOverriddenProperty;
|
||||
////}
|
||||
////
|
||||
/////// Make the protected members public
|
||||
////class C4 extends Base {
|
||||
//// public static protectedOverriddenMethod() { }
|
||||
//// public static protectedOverriddenProperty;
|
||||
////}
|
||||
////class Derived extends C4 {
|
||||
//// test() {
|
||||
//// Derived./*1*/
|
||||
//// }
|
||||
////}
|
||||
//// Derived./*2*/
|
||||
|
||||
// Sub class, everything but private is visible
|
||||
goTo.marker("1");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
// Can see protected methods elevated to public
|
||||
goTo.marker("2");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.not.memberListContains('protectedMethod');
|
||||
verify.not.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.memberListContains('protectedOverriddenProperty');
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class Base {
|
||||
//// private static privateMethod() { }
|
||||
//// private static privateProperty;
|
||||
////
|
||||
//// protected static protectedMethod() { }
|
||||
//// protected static protectedProperty;
|
||||
////
|
||||
//// public static publicMethod() { }
|
||||
//// public static publicProperty;
|
||||
////
|
||||
//// protected static protectedOverriddenMethod() { }
|
||||
//// protected static protectedOverriddenProperty;
|
||||
////}
|
||||
////
|
||||
/////// Make the protected members public
|
||||
////class C4 extends Base {
|
||||
//// public static protectedOverriddenMethod() { }
|
||||
//// public static protectedOverriddenProperty;
|
||||
////}
|
||||
////class Derived extends C4 {
|
||||
//// test() {
|
||||
//// Derived./*1*/
|
||||
//// }
|
||||
////}
|
||||
//// Derived./*2*/
|
||||
|
||||
// Sub class, everything but private is visible
|
||||
goTo.marker("1");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.memberListContains('protectedMethod');
|
||||
verify.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
// Can see protected methods elevated to public
|
||||
goTo.marker("2");
|
||||
verify.not.memberListContains('privateMethod');
|
||||
verify.not.memberListContains('privateProperty');
|
||||
verify.not.memberListContains('protectedMethod');
|
||||
verify.not.memberListContains('protectedProperty');
|
||||
verify.memberListContains('publicMethod');
|
||||
verify.memberListContains('publicProperty');
|
||||
verify.memberListContains('protectedOverriddenMethod');
|
||||
verify.memberListContains('protectedOverriddenProperty');
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
/// <reference path="fourslash.ts"/>
|
||||
|
||||
//// declare module "http" {
|
||||
//// var x;
|
||||
//// /*1*/
|
||||
//// }
|
||||
//// declare module 'https' {
|
||||
//// }
|
||||
//// /*2*/
|
||||
|
||||
goTo.marker("1");
|
||||
verify.not.completionListContains("http");
|
||||
goTo.marker("2");
|
||||
verify.not.completionListContains("http");
|
||||
verify.not.completionListContains("https");
|
||||
/// <reference path="fourslash.ts"/>
|
||||
|
||||
//// declare module "http" {
|
||||
//// var x;
|
||||
//// /*1*/
|
||||
//// }
|
||||
//// declare module 'https' {
|
||||
//// }
|
||||
//// /*2*/
|
||||
|
||||
goTo.marker("1");
|
||||
verify.not.completionListContains("http");
|
||||
goTo.marker("2");
|
||||
verify.not.completionListContains("http");
|
||||
verify.not.completionListContains("https");
|
||||
|
||||
@ -1,326 +1,326 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////module mod1 {
|
||||
//// var mod1var = 1;
|
||||
//// function mod1fn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class mod1cls {
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface mod1int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module mod1mod {
|
||||
//// var m1X = 1;
|
||||
//// function m1Func() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class m1Class {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface m1Int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export var m1eX = 1;
|
||||
//// export function m1eFunc() {
|
||||
//// }
|
||||
//// export class m1eClass {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface m1eInt {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module m1Mod { }
|
||||
//// export module m1eMod { }
|
||||
//// }
|
||||
//// export var mod1evar = 1;
|
||||
//// export function mod1efn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// export class mod1ecls {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface mod1eint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export module mod1emod {
|
||||
//// var mX = 1;
|
||||
//// function mFunc() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class mClass {
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface mInt {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export var meX = 1;
|
||||
//// export function meFunc() {
|
||||
//// }
|
||||
//// export class meClass {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface meInt {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module mMod { }
|
||||
//// export module meMod { }
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////// EXTENDING MODULE 1
|
||||
////module mod1 {
|
||||
//// export var mod1eexvar = 1;
|
||||
//// var mod1exvar = 2;
|
||||
////}
|
||||
////
|
||||
////module mod2 {
|
||||
//// var mod2var = "shadow";
|
||||
//// function mod2fn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class mod2cls {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// module mod2mod { }
|
||||
//// interface mod2int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export var mod2evar = 1;
|
||||
//// export function mod2efn() {
|
||||
//// }
|
||||
//// export class mod2ecls {
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface mod2eint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export module mod2emod { }
|
||||
////}
|
||||
////
|
||||
////module mod2 {
|
||||
//// export var mod2eexvar = 1;
|
||||
////}
|
||||
////
|
||||
////module mod3 {
|
||||
//// var shwvar = "shadow";
|
||||
//// function shwfn(shadow: any) {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class shwcls {
|
||||
//// constructor(public shadow: any) { }
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface shwint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// sivar: string;
|
||||
//// sifn(shadow: any): any;
|
||||
//// }
|
||||
//// /*shadowModuleWithNoExport*/
|
||||
////}
|
||||
////
|
||||
////module mod4 {
|
||||
//// export var shwvar = "shadow";
|
||||
//// export function shwfn(shadow: any) {
|
||||
//// var bar = 1;
|
||||
//// function foob(){ }
|
||||
//// }
|
||||
//// export class shwcls {
|
||||
//// constructor(shadow: any) { }
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface shwint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// sivar: string;
|
||||
//// sifn(shadow: any): any;
|
||||
//// }
|
||||
//// /*shadowModuleWithExport*/
|
||||
////}
|
||||
////
|
||||
////module mod5 {
|
||||
//// import Mod1 = mod1;
|
||||
//// import iMod1 = mod1.mod1emod;
|
||||
//// /*moduleWithImport*/
|
||||
////}
|
||||
////
|
||||
////function shwfn() {
|
||||
//// var sfvar = 1;
|
||||
//// function sffn() { }
|
||||
////}
|
||||
////
|
||||
////class shwcls {
|
||||
//// private scvar = 1;
|
||||
//// private scfn() { }
|
||||
//// public scpfn() { }
|
||||
//// public scpvar = 1;
|
||||
//// static scsvar = 1;
|
||||
//// static scsfn() { }
|
||||
////}
|
||||
////
|
||||
////interface shwint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// sivar: any;
|
||||
//// sifn(bar: any): any;
|
||||
////}
|
||||
////
|
||||
////var shwvar = 1;
|
||||
|
||||
function sharedNegativeVerify()
|
||||
{
|
||||
verify.not.completionListContains('sfvar');
|
||||
verify.not.completionListContains('sffn');
|
||||
verify.not.completionListContains('scvar');
|
||||
verify.not.completionListContains('scfn');
|
||||
verify.not.completionListContains('scpfn');
|
||||
verify.not.completionListContains('scpvar');
|
||||
verify.not.completionListContains('scsvar');
|
||||
verify.not.completionListContains('scsfn');
|
||||
verify.not.completionListContains('sivar');
|
||||
verify.not.completionListContains('sifn');
|
||||
verify.not.completionListContains('mod1exvar');
|
||||
verify.not.completionListContains('mod2eexvar');
|
||||
}
|
||||
|
||||
function goToMarkAndVerifyShadow()
|
||||
{
|
||||
sharedNegativeVerify();
|
||||
verify.not.completionListContains('mod2var');
|
||||
verify.not.completionListContains('mod2fn');
|
||||
verify.not.completionListContains('mod2cls');
|
||||
verify.not.completionListContains('mod2int');
|
||||
verify.not.completionListContains('mod2mod');
|
||||
verify.not.completionListContains('mod2evar');
|
||||
verify.not.completionListContains('mod2efn');
|
||||
verify.not.completionListContains('mod2ecls');
|
||||
verify.not.completionListContains('mod2eint');
|
||||
verify.not.completionListContains('mod2emod');
|
||||
}
|
||||
|
||||
// from a shadow module with no export
|
||||
goTo.marker('shadowModuleWithNoExport');
|
||||
verify.completionListContains('shwvar', '(var) shwvar: string');
|
||||
verify.completionListContains('shwfn', '(function) shwfn(shadow: any): void');
|
||||
verify.completionListContains('shwcls', 'class shwcls');
|
||||
verify.completionListContains('shwint', 'interface shwint');
|
||||
goToMarkAndVerifyShadow();
|
||||
|
||||
// from a shadow module with export
|
||||
goTo.marker('shadowModuleWithExport');
|
||||
verify.completionListContains('shwvar', '(var) mod4.shwvar: string');
|
||||
verify.completionListContains('shwfn', '(function) mod4.shwfn(shadow: any): void');
|
||||
verify.completionListContains('shwcls', 'class mod4.shwcls');
|
||||
verify.completionListContains('shwint', 'interface mod4.shwint');
|
||||
goToMarkAndVerifyShadow();
|
||||
|
||||
// from a modlue with import
|
||||
goTo.marker('moduleWithImport');
|
||||
verify.completionListContains('mod1', 'module mod1');
|
||||
verify.completionListContains('mod2', 'module mod2');
|
||||
verify.completionListContains('mod3', 'module mod3');
|
||||
verify.completionListContains('shwvar', '(var) shwvar: number');
|
||||
verify.completionListContains('shwfn', '(function) shwfn(): void');
|
||||
verify.completionListContains('shwcls', 'class shwcls');
|
||||
verify.completionListContains('shwint', 'interface shwint');
|
||||
|
||||
sharedNegativeVerify();
|
||||
|
||||
verify.not.completionListContains('mod1var');
|
||||
verify.not.completionListContains('mod1fn');
|
||||
verify.not.completionListContains('mod1cls');
|
||||
verify.not.completionListContains('mod1int');
|
||||
verify.not.completionListContains('mod1mod');
|
||||
verify.not.completionListContains('mod1evar');
|
||||
verify.not.completionListContains('mod1efn');
|
||||
verify.not.completionListContains('mod1ecls');
|
||||
verify.not.completionListContains('mod1eint');
|
||||
verify.not.completionListContains('mod1emod');
|
||||
verify.not.completionListContains('mX');
|
||||
verify.not.completionListContains('mFunc');
|
||||
verify.not.completionListContains('mClass');
|
||||
verify.not.completionListContains('mInt');
|
||||
verify.not.completionListContains('mMod');
|
||||
verify.not.completionListContains('meX');
|
||||
verify.not.completionListContains('meFunc');
|
||||
verify.not.completionListContains('meClass');
|
||||
verify.not.completionListContains('meInt');
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////module mod1 {
|
||||
//// var mod1var = 1;
|
||||
//// function mod1fn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class mod1cls {
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface mod1int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module mod1mod {
|
||||
//// var m1X = 1;
|
||||
//// function m1Func() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class m1Class {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface m1Int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export var m1eX = 1;
|
||||
//// export function m1eFunc() {
|
||||
//// }
|
||||
//// export class m1eClass {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface m1eInt {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module m1Mod { }
|
||||
//// export module m1eMod { }
|
||||
//// }
|
||||
//// export var mod1evar = 1;
|
||||
//// export function mod1efn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// export class mod1ecls {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface mod1eint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export module mod1emod {
|
||||
//// var mX = 1;
|
||||
//// function mFunc() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class mClass {
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface mInt {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export var meX = 1;
|
||||
//// export function meFunc() {
|
||||
//// }
|
||||
//// export class meClass {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface meInt {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module mMod { }
|
||||
//// export module meMod { }
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////// EXTENDING MODULE 1
|
||||
////module mod1 {
|
||||
//// export var mod1eexvar = 1;
|
||||
//// var mod1exvar = 2;
|
||||
////}
|
||||
////
|
||||
////module mod2 {
|
||||
//// var mod2var = "shadow";
|
||||
//// function mod2fn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class mod2cls {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// module mod2mod { }
|
||||
//// interface mod2int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export var mod2evar = 1;
|
||||
//// export function mod2efn() {
|
||||
//// }
|
||||
//// export class mod2ecls {
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface mod2eint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export module mod2emod { }
|
||||
////}
|
||||
////
|
||||
////module mod2 {
|
||||
//// export var mod2eexvar = 1;
|
||||
////}
|
||||
////
|
||||
////module mod3 {
|
||||
//// var shwvar = "shadow";
|
||||
//// function shwfn(shadow: any) {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class shwcls {
|
||||
//// constructor(public shadow: any) { }
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface shwint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// sivar: string;
|
||||
//// sifn(shadow: any): any;
|
||||
//// }
|
||||
//// /*shadowModuleWithNoExport*/
|
||||
////}
|
||||
////
|
||||
////module mod4 {
|
||||
//// export var shwvar = "shadow";
|
||||
//// export function shwfn(shadow: any) {
|
||||
//// var bar = 1;
|
||||
//// function foob(){ }
|
||||
//// }
|
||||
//// export class shwcls {
|
||||
//// constructor(shadow: any) { }
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface shwint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// sivar: string;
|
||||
//// sifn(shadow: any): any;
|
||||
//// }
|
||||
//// /*shadowModuleWithExport*/
|
||||
////}
|
||||
////
|
||||
////module mod5 {
|
||||
//// import Mod1 = mod1;
|
||||
//// import iMod1 = mod1.mod1emod;
|
||||
//// /*moduleWithImport*/
|
||||
////}
|
||||
////
|
||||
////function shwfn() {
|
||||
//// var sfvar = 1;
|
||||
//// function sffn() { }
|
||||
////}
|
||||
////
|
||||
////class shwcls {
|
||||
//// private scvar = 1;
|
||||
//// private scfn() { }
|
||||
//// public scpfn() { }
|
||||
//// public scpvar = 1;
|
||||
//// static scsvar = 1;
|
||||
//// static scsfn() { }
|
||||
////}
|
||||
////
|
||||
////interface shwint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// sivar: any;
|
||||
//// sifn(bar: any): any;
|
||||
////}
|
||||
////
|
||||
////var shwvar = 1;
|
||||
|
||||
function sharedNegativeVerify()
|
||||
{
|
||||
verify.not.completionListContains('sfvar');
|
||||
verify.not.completionListContains('sffn');
|
||||
verify.not.completionListContains('scvar');
|
||||
verify.not.completionListContains('scfn');
|
||||
verify.not.completionListContains('scpfn');
|
||||
verify.not.completionListContains('scpvar');
|
||||
verify.not.completionListContains('scsvar');
|
||||
verify.not.completionListContains('scsfn');
|
||||
verify.not.completionListContains('sivar');
|
||||
verify.not.completionListContains('sifn');
|
||||
verify.not.completionListContains('mod1exvar');
|
||||
verify.not.completionListContains('mod2eexvar');
|
||||
}
|
||||
|
||||
function goToMarkAndVerifyShadow()
|
||||
{
|
||||
sharedNegativeVerify();
|
||||
verify.not.completionListContains('mod2var');
|
||||
verify.not.completionListContains('mod2fn');
|
||||
verify.not.completionListContains('mod2cls');
|
||||
verify.not.completionListContains('mod2int');
|
||||
verify.not.completionListContains('mod2mod');
|
||||
verify.not.completionListContains('mod2evar');
|
||||
verify.not.completionListContains('mod2efn');
|
||||
verify.not.completionListContains('mod2ecls');
|
||||
verify.not.completionListContains('mod2eint');
|
||||
verify.not.completionListContains('mod2emod');
|
||||
}
|
||||
|
||||
// from a shadow module with no export
|
||||
goTo.marker('shadowModuleWithNoExport');
|
||||
verify.completionListContains('shwvar', '(var) shwvar: string');
|
||||
verify.completionListContains('shwfn', '(function) shwfn(shadow: any): void');
|
||||
verify.completionListContains('shwcls', 'class shwcls');
|
||||
verify.completionListContains('shwint', 'interface shwint');
|
||||
goToMarkAndVerifyShadow();
|
||||
|
||||
// from a shadow module with export
|
||||
goTo.marker('shadowModuleWithExport');
|
||||
verify.completionListContains('shwvar', '(var) mod4.shwvar: string');
|
||||
verify.completionListContains('shwfn', '(function) mod4.shwfn(shadow: any): void');
|
||||
verify.completionListContains('shwcls', 'class mod4.shwcls');
|
||||
verify.completionListContains('shwint', 'interface mod4.shwint');
|
||||
goToMarkAndVerifyShadow();
|
||||
|
||||
// from a modlue with import
|
||||
goTo.marker('moduleWithImport');
|
||||
verify.completionListContains('mod1', 'module mod1');
|
||||
verify.completionListContains('mod2', 'module mod2');
|
||||
verify.completionListContains('mod3', 'module mod3');
|
||||
verify.completionListContains('shwvar', '(var) shwvar: number');
|
||||
verify.completionListContains('shwfn', '(function) shwfn(): void');
|
||||
verify.completionListContains('shwcls', 'class shwcls');
|
||||
verify.completionListContains('shwint', 'interface shwint');
|
||||
|
||||
sharedNegativeVerify();
|
||||
|
||||
verify.not.completionListContains('mod1var');
|
||||
verify.not.completionListContains('mod1fn');
|
||||
verify.not.completionListContains('mod1cls');
|
||||
verify.not.completionListContains('mod1int');
|
||||
verify.not.completionListContains('mod1mod');
|
||||
verify.not.completionListContains('mod1evar');
|
||||
verify.not.completionListContains('mod1efn');
|
||||
verify.not.completionListContains('mod1ecls');
|
||||
verify.not.completionListContains('mod1eint');
|
||||
verify.not.completionListContains('mod1emod');
|
||||
verify.not.completionListContains('mX');
|
||||
verify.not.completionListContains('mFunc');
|
||||
verify.not.completionListContains('mClass');
|
||||
verify.not.completionListContains('mInt');
|
||||
verify.not.completionListContains('mMod');
|
||||
verify.not.completionListContains('meX');
|
||||
verify.not.completionListContains('meFunc');
|
||||
verify.not.completionListContains('meClass');
|
||||
verify.not.completionListContains('meInt');
|
||||
verify.not.completionListContains('meMod');
|
||||
@ -1,364 +1,364 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////module mod1 {
|
||||
//// var mod1var = 1;
|
||||
//// function mod1fn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// /*function*/
|
||||
//// }
|
||||
//// class mod1cls {
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// /*class*/
|
||||
//// }
|
||||
//// interface mod1int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// /*interface*/
|
||||
//// }
|
||||
//// module mod1mod {
|
||||
//// var m1X = 1;
|
||||
//// function m1Func() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class m1Class {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface m1Int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export var m1eX = 1;
|
||||
//// export function m1eFunc() {
|
||||
//// }
|
||||
//// export class m1eClass {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface m1eInt {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module m1Mod { }
|
||||
//// export module m1eMod { }
|
||||
//// /*module*/
|
||||
//// }
|
||||
//// export var mod1evar = 1;
|
||||
//// export function mod1efn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// /*exportedFunction*/
|
||||
//// }
|
||||
//// export class mod1ecls {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// /*exportedClass*/
|
||||
//// }
|
||||
//// export interface mod1eint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// /*exportedInterface*/
|
||||
//// }
|
||||
//// export module mod1emod {
|
||||
//// var mX = 1;
|
||||
//// function mFunc() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class mClass {
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface mInt {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export var meX = 1;
|
||||
//// export function meFunc() {
|
||||
//// }
|
||||
//// export class meClass {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface meInt {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module mMod { }
|
||||
//// export module meMod { }
|
||||
//// /*exportedModule*/
|
||||
//// }
|
||||
//// /*mod1*/
|
||||
////}
|
||||
////
|
||||
////// EXTENDING MODULE 1
|
||||
////module mod1 {
|
||||
//// export var mod1eexvar = 1;
|
||||
//// var mod1exvar = 2;
|
||||
//// /*extendedModule*/
|
||||
////}
|
||||
////
|
||||
////module mod2 {
|
||||
//// var mod2var = "shadow";
|
||||
//// function mod2fn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class mod2cls {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// module mod2mod { }
|
||||
//// interface mod2int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export var mod2evar = 1;
|
||||
//// export function mod2efn() {
|
||||
//// }
|
||||
//// export class mod2ecls {
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface mod2eint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export module mod2emod { }
|
||||
////}
|
||||
////
|
||||
////module mod2 {
|
||||
//// export var mod2eexvar = 1;
|
||||
////}
|
||||
////
|
||||
////module mod3 {
|
||||
//// var shwvar = "shadow";
|
||||
//// function shwfn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class shwcls {
|
||||
//// constructor(public shadow: any) { }
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface shwint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// sivar: string;
|
||||
//// sifn(shadow: any): any;
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////function shwfn() {
|
||||
//// var sfvar = 1;
|
||||
//// function sffn() { }
|
||||
////}
|
||||
////
|
||||
////class shwcls {
|
||||
//// private scvar = 1;
|
||||
//// private scfn() { }
|
||||
//// public scpfn() { }
|
||||
//// public scpvar = 1;
|
||||
//// static scsvar = 1;
|
||||
//// static scsfn() { }
|
||||
////}
|
||||
////
|
||||
////interface shwint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// sivar: any;
|
||||
//// sifn(bar: any): any;
|
||||
////}
|
||||
////
|
||||
////var shwvar = 1;
|
||||
|
||||
function goToMarkAndGeneralVerify(marker: string)
|
||||
{
|
||||
goTo.marker(marker);
|
||||
|
||||
verify.completionListContains('mod1var', '(var) mod1var: number');
|
||||
verify.completionListContains('mod1fn', '(function) mod1fn(): void');
|
||||
verify.completionListContains('mod1cls', 'class mod1cls');
|
||||
verify.completionListContains('mod1int', 'interface mod1int');
|
||||
verify.completionListContains('mod1mod', 'module mod1mod');
|
||||
verify.completionListContains('mod1evar', '(var) mod1.mod1evar: number');
|
||||
verify.completionListContains('mod1efn', '(function) mod1.mod1efn(): void');
|
||||
verify.completionListContains('mod1ecls', 'class mod1.mod1ecls');
|
||||
verify.completionListContains('mod1eint', 'interface mod1.mod1eint');
|
||||
verify.completionListContains('mod1emod', 'module mod1.mod1emod');
|
||||
verify.completionListContains('mod1eexvar', '(var) mod1.mod1eexvar: number');
|
||||
verify.completionListContains('mod2', 'module mod2');
|
||||
verify.completionListContains('mod3', 'module mod3');
|
||||
verify.completionListContains('shwvar', '(var) shwvar: number');
|
||||
verify.completionListContains('shwfn', '(function) shwfn(): void');
|
||||
verify.completionListContains('shwcls', 'class shwcls');
|
||||
verify.completionListContains('shwint', 'interface shwint');
|
||||
|
||||
verify.not.completionListContains('mod2var');
|
||||
verify.not.completionListContains('mod2fn');
|
||||
verify.not.completionListContains('mod2cls');
|
||||
verify.not.completionListContains('mod2int');
|
||||
verify.not.completionListContains('mod2mod');
|
||||
verify.not.completionListContains('mod2evar');
|
||||
verify.not.completionListContains('mod2efn');
|
||||
verify.not.completionListContains('mod2ecls');
|
||||
verify.not.completionListContains('mod2eint');
|
||||
verify.not.completionListContains('mod2emod');
|
||||
verify.not.completionListContains('sfvar');
|
||||
verify.not.completionListContains('sffn');
|
||||
verify.not.completionListContains('scvar');
|
||||
verify.not.completionListContains('scfn');
|
||||
verify.not.completionListContains('scpfn');
|
||||
verify.not.completionListContains('scpvar');
|
||||
verify.not.completionListContains('scsvar');
|
||||
verify.not.completionListContains('scsfn');
|
||||
verify.not.completionListContains('sivar');
|
||||
verify.not.completionListContains('sifn');
|
||||
verify.not.completionListContains('mod1exvar');
|
||||
verify.not.completionListContains('mod2eexvar');
|
||||
}
|
||||
|
||||
// from mod1
|
||||
goToMarkAndGeneralVerify('mod1');
|
||||
|
||||
// from function in mod1
|
||||
goToMarkAndGeneralVerify('function');
|
||||
verify.completionListContains('bar', '(local var) bar: number');
|
||||
verify.completionListContains('foob', '(local function) foob(): void');
|
||||
|
||||
// from class in mod1
|
||||
goToMarkAndGeneralVerify('class');
|
||||
//verify.not.completionListContains('ceFunc');
|
||||
//verify.not.completionListContains('ceVar');
|
||||
|
||||
// from interface in mod1
|
||||
goToMarkAndGeneralVerify('interface');
|
||||
|
||||
// from module in mod1
|
||||
goToMarkAndGeneralVerify('module');
|
||||
verify.completionListContains('m1X', '(var) m1X: number');
|
||||
verify.completionListContains('m1Func', '(function) m1Func(): void');
|
||||
verify.completionListContains('m1Class', 'class m1Class');
|
||||
verify.completionListContains('m1Int', 'interface m1Int');
|
||||
verify.completionListContains('m1Mod', 'module m1Mod');
|
||||
verify.completionListContains('m1eX', '(var) mod1mod.m1eX: number');
|
||||
verify.completionListContains('m1eFunc', '(function) mod1mod.m1eFunc(): void');
|
||||
verify.completionListContains('m1eClass', 'class mod1mod.m1eClass');
|
||||
verify.completionListContains('m1eInt', 'interface mod1mod.m1eInt');
|
||||
verify.completionListContains('m1eMod', 'module mod1mod.m1eMod');
|
||||
|
||||
// from exported function in mod1
|
||||
goToMarkAndGeneralVerify('exportedFunction');
|
||||
verify.completionListContains('bar', '(local var) bar: number');
|
||||
verify.completionListContains('foob', '(local function) foob(): void');
|
||||
|
||||
// from exported class in mod1
|
||||
goToMarkAndGeneralVerify('exportedClass');
|
||||
//verify.not.completionListContains('ceFunc');
|
||||
//verify.not.completionListContains('ceVar');
|
||||
|
||||
// from exported interface in mod1
|
||||
goToMarkAndGeneralVerify('exportedInterface');
|
||||
|
||||
// from exported module in mod1
|
||||
goToMarkAndGeneralVerify('exportedModule');
|
||||
verify.completionListContains('mX', '(var) mX: number');
|
||||
verify.completionListContains('mFunc', '(function) mFunc(): void');
|
||||
verify.completionListContains('mClass', 'class mClass');
|
||||
verify.completionListContains('mInt', 'interface mInt');
|
||||
verify.completionListContains('mMod', 'module mMod');
|
||||
verify.completionListContains('meX', '(var) mod1.mod1emod.meX: number');
|
||||
verify.completionListContains('meFunc', '(function) mod1.mod1emod.meFunc(): void');
|
||||
verify.completionListContains('meClass', 'class mod1.mod1emod.meClass');
|
||||
verify.completionListContains('meInt', 'interface mod1.mod1emod.meInt');
|
||||
verify.completionListContains('meMod', 'module mod1.mod1emod.meMod');
|
||||
|
||||
// from extended module
|
||||
goTo.marker('extendedModule');
|
||||
verify.completionListContains('mod1evar', '(var) mod1.mod1evar: number');
|
||||
verify.completionListContains('mod1efn', '(function) mod1.mod1efn(): void');
|
||||
verify.completionListContains('mod1ecls', 'class mod1.mod1ecls');
|
||||
verify.completionListContains('mod1eint', 'interface mod1.mod1eint');
|
||||
verify.completionListContains('mod1emod', 'module mod1.mod1emod');
|
||||
verify.completionListContains('mod1eexvar', '(var) mod1.mod1eexvar: number');
|
||||
verify.completionListContains('mod2', 'module mod2');
|
||||
verify.completionListContains('mod3', 'module mod3');
|
||||
verify.completionListContains('shwvar', '(var) shwvar: number');
|
||||
verify.completionListContains('shwfn', '(function) shwfn(): void');
|
||||
verify.completionListContains('shwcls', 'class shwcls');
|
||||
verify.completionListContains('shwint', 'interface shwint');
|
||||
|
||||
verify.not.completionListContains('mod2var');
|
||||
verify.not.completionListContains('mod2fn');
|
||||
verify.not.completionListContains('mod2cls');
|
||||
verify.not.completionListContains('mod2int');
|
||||
verify.not.completionListContains('mod2mod');
|
||||
verify.not.completionListContains('mod2evar');
|
||||
verify.not.completionListContains('mod2efn');
|
||||
verify.not.completionListContains('mod2ecls');
|
||||
verify.not.completionListContains('mod2eint');
|
||||
verify.not.completionListContains('mod2emod');
|
||||
verify.not.completionListContains('sfvar');
|
||||
verify.not.completionListContains('sffn');
|
||||
verify.not.completionListContains('scvar');
|
||||
verify.not.completionListContains('scfn');
|
||||
verify.not.completionListContains('scpfn');
|
||||
verify.not.completionListContains('scpvar');
|
||||
verify.not.completionListContains('scsvar');
|
||||
verify.not.completionListContains('scsfn');
|
||||
verify.not.completionListContains('sivar');
|
||||
verify.not.completionListContains('sifn');
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////module mod1 {
|
||||
//// var mod1var = 1;
|
||||
//// function mod1fn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// /*function*/
|
||||
//// }
|
||||
//// class mod1cls {
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// /*class*/
|
||||
//// }
|
||||
//// interface mod1int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// /*interface*/
|
||||
//// }
|
||||
//// module mod1mod {
|
||||
//// var m1X = 1;
|
||||
//// function m1Func() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class m1Class {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface m1Int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export var m1eX = 1;
|
||||
//// export function m1eFunc() {
|
||||
//// }
|
||||
//// export class m1eClass {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface m1eInt {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module m1Mod { }
|
||||
//// export module m1eMod { }
|
||||
//// /*module*/
|
||||
//// }
|
||||
//// export var mod1evar = 1;
|
||||
//// export function mod1efn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// /*exportedFunction*/
|
||||
//// }
|
||||
//// export class mod1ecls {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// /*exportedClass*/
|
||||
//// }
|
||||
//// export interface mod1eint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// /*exportedInterface*/
|
||||
//// }
|
||||
//// export module mod1emod {
|
||||
//// var mX = 1;
|
||||
//// function mFunc() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class mClass {
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface mInt {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export var meX = 1;
|
||||
//// export function meFunc() {
|
||||
//// }
|
||||
//// export class meClass {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface meInt {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module mMod { }
|
||||
//// export module meMod { }
|
||||
//// /*exportedModule*/
|
||||
//// }
|
||||
//// /*mod1*/
|
||||
////}
|
||||
////
|
||||
////// EXTENDING MODULE 1
|
||||
////module mod1 {
|
||||
//// export var mod1eexvar = 1;
|
||||
//// var mod1exvar = 2;
|
||||
//// /*extendedModule*/
|
||||
////}
|
||||
////
|
||||
////module mod2 {
|
||||
//// var mod2var = "shadow";
|
||||
//// function mod2fn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class mod2cls {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// module mod2mod { }
|
||||
//// interface mod2int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export var mod2evar = 1;
|
||||
//// export function mod2efn() {
|
||||
//// }
|
||||
//// export class mod2ecls {
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface mod2eint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export module mod2emod { }
|
||||
////}
|
||||
////
|
||||
////module mod2 {
|
||||
//// export var mod2eexvar = 1;
|
||||
////}
|
||||
////
|
||||
////module mod3 {
|
||||
//// var shwvar = "shadow";
|
||||
//// function shwfn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class shwcls {
|
||||
//// constructor(public shadow: any) { }
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface shwint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// sivar: string;
|
||||
//// sifn(shadow: any): any;
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////function shwfn() {
|
||||
//// var sfvar = 1;
|
||||
//// function sffn() { }
|
||||
////}
|
||||
////
|
||||
////class shwcls {
|
||||
//// private scvar = 1;
|
||||
//// private scfn() { }
|
||||
//// public scpfn() { }
|
||||
//// public scpvar = 1;
|
||||
//// static scsvar = 1;
|
||||
//// static scsfn() { }
|
||||
////}
|
||||
////
|
||||
////interface shwint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// sivar: any;
|
||||
//// sifn(bar: any): any;
|
||||
////}
|
||||
////
|
||||
////var shwvar = 1;
|
||||
|
||||
function goToMarkAndGeneralVerify(marker: string)
|
||||
{
|
||||
goTo.marker(marker);
|
||||
|
||||
verify.completionListContains('mod1var', '(var) mod1var: number');
|
||||
verify.completionListContains('mod1fn', '(function) mod1fn(): void');
|
||||
verify.completionListContains('mod1cls', 'class mod1cls');
|
||||
verify.completionListContains('mod1int', 'interface mod1int');
|
||||
verify.completionListContains('mod1mod', 'module mod1mod');
|
||||
verify.completionListContains('mod1evar', '(var) mod1.mod1evar: number');
|
||||
verify.completionListContains('mod1efn', '(function) mod1.mod1efn(): void');
|
||||
verify.completionListContains('mod1ecls', 'class mod1.mod1ecls');
|
||||
verify.completionListContains('mod1eint', 'interface mod1.mod1eint');
|
||||
verify.completionListContains('mod1emod', 'module mod1.mod1emod');
|
||||
verify.completionListContains('mod1eexvar', '(var) mod1.mod1eexvar: number');
|
||||
verify.completionListContains('mod2', 'module mod2');
|
||||
verify.completionListContains('mod3', 'module mod3');
|
||||
verify.completionListContains('shwvar', '(var) shwvar: number');
|
||||
verify.completionListContains('shwfn', '(function) shwfn(): void');
|
||||
verify.completionListContains('shwcls', 'class shwcls');
|
||||
verify.completionListContains('shwint', 'interface shwint');
|
||||
|
||||
verify.not.completionListContains('mod2var');
|
||||
verify.not.completionListContains('mod2fn');
|
||||
verify.not.completionListContains('mod2cls');
|
||||
verify.not.completionListContains('mod2int');
|
||||
verify.not.completionListContains('mod2mod');
|
||||
verify.not.completionListContains('mod2evar');
|
||||
verify.not.completionListContains('mod2efn');
|
||||
verify.not.completionListContains('mod2ecls');
|
||||
verify.not.completionListContains('mod2eint');
|
||||
verify.not.completionListContains('mod2emod');
|
||||
verify.not.completionListContains('sfvar');
|
||||
verify.not.completionListContains('sffn');
|
||||
verify.not.completionListContains('scvar');
|
||||
verify.not.completionListContains('scfn');
|
||||
verify.not.completionListContains('scpfn');
|
||||
verify.not.completionListContains('scpvar');
|
||||
verify.not.completionListContains('scsvar');
|
||||
verify.not.completionListContains('scsfn');
|
||||
verify.not.completionListContains('sivar');
|
||||
verify.not.completionListContains('sifn');
|
||||
verify.not.completionListContains('mod1exvar');
|
||||
verify.not.completionListContains('mod2eexvar');
|
||||
}
|
||||
|
||||
// from mod1
|
||||
goToMarkAndGeneralVerify('mod1');
|
||||
|
||||
// from function in mod1
|
||||
goToMarkAndGeneralVerify('function');
|
||||
verify.completionListContains('bar', '(local var) bar: number');
|
||||
verify.completionListContains('foob', '(local function) foob(): void');
|
||||
|
||||
// from class in mod1
|
||||
goToMarkAndGeneralVerify('class');
|
||||
//verify.not.completionListContains('ceFunc');
|
||||
//verify.not.completionListContains('ceVar');
|
||||
|
||||
// from interface in mod1
|
||||
goToMarkAndGeneralVerify('interface');
|
||||
|
||||
// from module in mod1
|
||||
goToMarkAndGeneralVerify('module');
|
||||
verify.completionListContains('m1X', '(var) m1X: number');
|
||||
verify.completionListContains('m1Func', '(function) m1Func(): void');
|
||||
verify.completionListContains('m1Class', 'class m1Class');
|
||||
verify.completionListContains('m1Int', 'interface m1Int');
|
||||
verify.completionListContains('m1Mod', 'module m1Mod');
|
||||
verify.completionListContains('m1eX', '(var) mod1mod.m1eX: number');
|
||||
verify.completionListContains('m1eFunc', '(function) mod1mod.m1eFunc(): void');
|
||||
verify.completionListContains('m1eClass', 'class mod1mod.m1eClass');
|
||||
verify.completionListContains('m1eInt', 'interface mod1mod.m1eInt');
|
||||
verify.completionListContains('m1eMod', 'module mod1mod.m1eMod');
|
||||
|
||||
// from exported function in mod1
|
||||
goToMarkAndGeneralVerify('exportedFunction');
|
||||
verify.completionListContains('bar', '(local var) bar: number');
|
||||
verify.completionListContains('foob', '(local function) foob(): void');
|
||||
|
||||
// from exported class in mod1
|
||||
goToMarkAndGeneralVerify('exportedClass');
|
||||
//verify.not.completionListContains('ceFunc');
|
||||
//verify.not.completionListContains('ceVar');
|
||||
|
||||
// from exported interface in mod1
|
||||
goToMarkAndGeneralVerify('exportedInterface');
|
||||
|
||||
// from exported module in mod1
|
||||
goToMarkAndGeneralVerify('exportedModule');
|
||||
verify.completionListContains('mX', '(var) mX: number');
|
||||
verify.completionListContains('mFunc', '(function) mFunc(): void');
|
||||
verify.completionListContains('mClass', 'class mClass');
|
||||
verify.completionListContains('mInt', 'interface mInt');
|
||||
verify.completionListContains('mMod', 'module mMod');
|
||||
verify.completionListContains('meX', '(var) mod1.mod1emod.meX: number');
|
||||
verify.completionListContains('meFunc', '(function) mod1.mod1emod.meFunc(): void');
|
||||
verify.completionListContains('meClass', 'class mod1.mod1emod.meClass');
|
||||
verify.completionListContains('meInt', 'interface mod1.mod1emod.meInt');
|
||||
verify.completionListContains('meMod', 'module mod1.mod1emod.meMod');
|
||||
|
||||
// from extended module
|
||||
goTo.marker('extendedModule');
|
||||
verify.completionListContains('mod1evar', '(var) mod1.mod1evar: number');
|
||||
verify.completionListContains('mod1efn', '(function) mod1.mod1efn(): void');
|
||||
verify.completionListContains('mod1ecls', 'class mod1.mod1ecls');
|
||||
verify.completionListContains('mod1eint', 'interface mod1.mod1eint');
|
||||
verify.completionListContains('mod1emod', 'module mod1.mod1emod');
|
||||
verify.completionListContains('mod1eexvar', '(var) mod1.mod1eexvar: number');
|
||||
verify.completionListContains('mod2', 'module mod2');
|
||||
verify.completionListContains('mod3', 'module mod3');
|
||||
verify.completionListContains('shwvar', '(var) shwvar: number');
|
||||
verify.completionListContains('shwfn', '(function) shwfn(): void');
|
||||
verify.completionListContains('shwcls', 'class shwcls');
|
||||
verify.completionListContains('shwint', 'interface shwint');
|
||||
|
||||
verify.not.completionListContains('mod2var');
|
||||
verify.not.completionListContains('mod2fn');
|
||||
verify.not.completionListContains('mod2cls');
|
||||
verify.not.completionListContains('mod2int');
|
||||
verify.not.completionListContains('mod2mod');
|
||||
verify.not.completionListContains('mod2evar');
|
||||
verify.not.completionListContains('mod2efn');
|
||||
verify.not.completionListContains('mod2ecls');
|
||||
verify.not.completionListContains('mod2eint');
|
||||
verify.not.completionListContains('mod2emod');
|
||||
verify.not.completionListContains('sfvar');
|
||||
verify.not.completionListContains('sffn');
|
||||
verify.not.completionListContains('scvar');
|
||||
verify.not.completionListContains('scfn');
|
||||
verify.not.completionListContains('scpfn');
|
||||
verify.not.completionListContains('scpvar');
|
||||
verify.not.completionListContains('scsvar');
|
||||
verify.not.completionListContains('scsfn');
|
||||
verify.not.completionListContains('sivar');
|
||||
verify.not.completionListContains('sifn');
|
||||
verify.not.completionListContains('mod2eexvar');
|
||||
@ -1,291 +1,291 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////module mod1 {
|
||||
//// var mod1var = 1;
|
||||
//// function mod1fn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class mod1cls {
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface mod1int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module mod1mod {
|
||||
//// var m1X = 1;
|
||||
//// function m1Func() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class m1Class {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface m1Int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export var m1eX = 1;
|
||||
//// export function m1eFunc() {
|
||||
//// }
|
||||
//// export class m1eClass {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface m1eInt {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module m1Mod { }
|
||||
//// export module m1eMod { }
|
||||
//// }
|
||||
//// export var mod1evar = 1;
|
||||
//// export function mod1efn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// export class mod1ecls {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface mod1eint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export module mod1emod {
|
||||
//// var mX = 1;
|
||||
//// function mFunc() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class mClass {
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface mInt {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export var meX = 1;
|
||||
//// export function meFunc() {
|
||||
//// }
|
||||
//// export class meClass {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface meInt {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module mMod { }
|
||||
//// export module meMod { }
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////// EXTENDING MODULE 1
|
||||
////module mod1 {
|
||||
//// export var mod1eexvar = 1;
|
||||
//// var mod1exvar = 2;
|
||||
////}
|
||||
////
|
||||
////module mod2 {
|
||||
//// var mod2var = "shadow";
|
||||
//// function mod2fn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class mod2cls {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// module mod2mod { }
|
||||
//// interface mod2int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export var mod2evar = 1;
|
||||
//// export function mod2efn() {
|
||||
//// }
|
||||
//// export class mod2ecls {
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface mod2eint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export module mod2emod { }
|
||||
////}
|
||||
////
|
||||
////module mod2 {
|
||||
//// export var mod2eexvar = 1;
|
||||
////}
|
||||
////
|
||||
////module mod3 {
|
||||
//// var shwvar = "shadow";
|
||||
//// function shwfn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class shwcls {
|
||||
//// constructor(public shadow: any) { }
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface shwint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// sivar: string;
|
||||
//// sifn(shadow: any): any;
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////function shwfn() {
|
||||
//// var sfvar = 1;
|
||||
//// function sffn() { }
|
||||
//// /*function*/
|
||||
////}
|
||||
////
|
||||
////class shwcls {
|
||||
//// private scvar = 1;
|
||||
//// private scfn() { }
|
||||
//// public scpfn() { }
|
||||
//// public scpvar = 1;
|
||||
//// static scsvar = 1;
|
||||
//// static scsfn() { }
|
||||
//// /*class*/
|
||||
////}
|
||||
////
|
||||
////interface shwint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// sivar: any;
|
||||
//// sifn(bar: any): any;
|
||||
//// /*interface*/
|
||||
////}
|
||||
////
|
||||
////var shwvar = 1;
|
||||
/////*global*/
|
||||
|
||||
function verifyNotContainFunctionMembers()
|
||||
{
|
||||
verify.not.completionListContains('sfvar');
|
||||
verify.not.completionListContains('sffn');
|
||||
}
|
||||
|
||||
function verifyNotContainClassMembers()
|
||||
{
|
||||
verify.not.completionListContains('scvar');
|
||||
verify.not.completionListContains('scfn');
|
||||
verify.not.completionListContains('scpfn');
|
||||
verify.not.completionListContains('scpvar');
|
||||
verify.not.completionListContains('scsvar');
|
||||
verify.not.completionListContains('scsfn');
|
||||
}
|
||||
|
||||
function verifyNotContainInterfaceMembers()
|
||||
{
|
||||
verify.not.completionListContains('sivar');
|
||||
verify.not.completionListContains('sifn');
|
||||
}
|
||||
|
||||
function goToMarkAndGeneralVerify(marker: string)
|
||||
{
|
||||
goTo.marker(marker);
|
||||
|
||||
verify.not.completionListContains('mod1var');
|
||||
verify.not.completionListContains('mod1fn');
|
||||
verify.not.completionListContains('mod1cls');
|
||||
verify.not.completionListContains('mod1int');
|
||||
verify.not.completionListContains('mod1mod');
|
||||
verify.not.completionListContains('mod1evar');
|
||||
verify.not.completionListContains('mod1efn');
|
||||
verify.not.completionListContains('mod1ecls');
|
||||
verify.not.completionListContains('mod1eint');
|
||||
verify.not.completionListContains('mod1emod');
|
||||
verify.not.completionListContains('mod1eexvar');
|
||||
}
|
||||
|
||||
// from global scope
|
||||
goToMarkAndGeneralVerify('global');
|
||||
verify.completionListContains('mod1', 'module mod1');
|
||||
verify.completionListContains('mod2', 'module mod2');
|
||||
verify.completionListContains('mod3', 'module mod3');
|
||||
verify.completionListContains('shwvar', '(var) shwvar: number');
|
||||
verify.completionListContains('shwfn', '(function) shwfn(): void');
|
||||
verify.completionListContains('shwcls', 'class shwcls');
|
||||
verify.completionListContains('shwint', 'interface shwint');
|
||||
|
||||
verifyNotContainFunctionMembers();
|
||||
verifyNotContainClassMembers();
|
||||
verifyNotContainInterfaceMembers();
|
||||
|
||||
// from function scope
|
||||
goToMarkAndGeneralVerify('function');
|
||||
verify.completionListContains('sfvar', '(local var) sfvar: number');
|
||||
verify.completionListContains('sffn', '(local function) sffn(): void');
|
||||
|
||||
verifyNotContainClassMembers();
|
||||
verifyNotContainInterfaceMembers();
|
||||
|
||||
// from class scope
|
||||
goToMarkAndGeneralVerify('class');
|
||||
verifyNotContainFunctionMembers();
|
||||
verifyNotContainInterfaceMembers();
|
||||
|
||||
// from interface scope
|
||||
goToMarkAndGeneralVerify('interface');
|
||||
verifyNotContainClassMembers();
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////module mod1 {
|
||||
//// var mod1var = 1;
|
||||
//// function mod1fn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class mod1cls {
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface mod1int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module mod1mod {
|
||||
//// var m1X = 1;
|
||||
//// function m1Func() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class m1Class {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface m1Int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export var m1eX = 1;
|
||||
//// export function m1eFunc() {
|
||||
//// }
|
||||
//// export class m1eClass {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface m1eInt {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module m1Mod { }
|
||||
//// export module m1eMod { }
|
||||
//// }
|
||||
//// export var mod1evar = 1;
|
||||
//// export function mod1efn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// export class mod1ecls {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface mod1eint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export module mod1emod {
|
||||
//// var mX = 1;
|
||||
//// function mFunc() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class mClass {
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface mInt {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export var meX = 1;
|
||||
//// export function meFunc() {
|
||||
//// }
|
||||
//// export class meClass {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface meInt {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module mMod { }
|
||||
//// export module meMod { }
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////// EXTENDING MODULE 1
|
||||
////module mod1 {
|
||||
//// export var mod1eexvar = 1;
|
||||
//// var mod1exvar = 2;
|
||||
////}
|
||||
////
|
||||
////module mod2 {
|
||||
//// var mod2var = "shadow";
|
||||
//// function mod2fn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class mod2cls {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// module mod2mod { }
|
||||
//// interface mod2int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export var mod2evar = 1;
|
||||
//// export function mod2efn() {
|
||||
//// }
|
||||
//// export class mod2ecls {
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface mod2eint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export module mod2emod { }
|
||||
////}
|
||||
////
|
||||
////module mod2 {
|
||||
//// export var mod2eexvar = 1;
|
||||
////}
|
||||
////
|
||||
////module mod3 {
|
||||
//// var shwvar = "shadow";
|
||||
//// function shwfn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class shwcls {
|
||||
//// constructor(public shadow: any) { }
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface shwint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// sivar: string;
|
||||
//// sifn(shadow: any): any;
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////function shwfn() {
|
||||
//// var sfvar = 1;
|
||||
//// function sffn() { }
|
||||
//// /*function*/
|
||||
////}
|
||||
////
|
||||
////class shwcls {
|
||||
//// private scvar = 1;
|
||||
//// private scfn() { }
|
||||
//// public scpfn() { }
|
||||
//// public scpvar = 1;
|
||||
//// static scsvar = 1;
|
||||
//// static scsfn() { }
|
||||
//// /*class*/
|
||||
////}
|
||||
////
|
||||
////interface shwint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// sivar: any;
|
||||
//// sifn(bar: any): any;
|
||||
//// /*interface*/
|
||||
////}
|
||||
////
|
||||
////var shwvar = 1;
|
||||
/////*global*/
|
||||
|
||||
function verifyNotContainFunctionMembers()
|
||||
{
|
||||
verify.not.completionListContains('sfvar');
|
||||
verify.not.completionListContains('sffn');
|
||||
}
|
||||
|
||||
function verifyNotContainClassMembers()
|
||||
{
|
||||
verify.not.completionListContains('scvar');
|
||||
verify.not.completionListContains('scfn');
|
||||
verify.not.completionListContains('scpfn');
|
||||
verify.not.completionListContains('scpvar');
|
||||
verify.not.completionListContains('scsvar');
|
||||
verify.not.completionListContains('scsfn');
|
||||
}
|
||||
|
||||
function verifyNotContainInterfaceMembers()
|
||||
{
|
||||
verify.not.completionListContains('sivar');
|
||||
verify.not.completionListContains('sifn');
|
||||
}
|
||||
|
||||
function goToMarkAndGeneralVerify(marker: string)
|
||||
{
|
||||
goTo.marker(marker);
|
||||
|
||||
verify.not.completionListContains('mod1var');
|
||||
verify.not.completionListContains('mod1fn');
|
||||
verify.not.completionListContains('mod1cls');
|
||||
verify.not.completionListContains('mod1int');
|
||||
verify.not.completionListContains('mod1mod');
|
||||
verify.not.completionListContains('mod1evar');
|
||||
verify.not.completionListContains('mod1efn');
|
||||
verify.not.completionListContains('mod1ecls');
|
||||
verify.not.completionListContains('mod1eint');
|
||||
verify.not.completionListContains('mod1emod');
|
||||
verify.not.completionListContains('mod1eexvar');
|
||||
}
|
||||
|
||||
// from global scope
|
||||
goToMarkAndGeneralVerify('global');
|
||||
verify.completionListContains('mod1', 'module mod1');
|
||||
verify.completionListContains('mod2', 'module mod2');
|
||||
verify.completionListContains('mod3', 'module mod3');
|
||||
verify.completionListContains('shwvar', '(var) shwvar: number');
|
||||
verify.completionListContains('shwfn', '(function) shwfn(): void');
|
||||
verify.completionListContains('shwcls', 'class shwcls');
|
||||
verify.completionListContains('shwint', 'interface shwint');
|
||||
|
||||
verifyNotContainFunctionMembers();
|
||||
verifyNotContainClassMembers();
|
||||
verifyNotContainInterfaceMembers();
|
||||
|
||||
// from function scope
|
||||
goToMarkAndGeneralVerify('function');
|
||||
verify.completionListContains('sfvar', '(local var) sfvar: number');
|
||||
verify.completionListContains('sffn', '(local function) sffn(): void');
|
||||
|
||||
verifyNotContainClassMembers();
|
||||
verifyNotContainInterfaceMembers();
|
||||
|
||||
// from class scope
|
||||
goToMarkAndGeneralVerify('class');
|
||||
verifyNotContainFunctionMembers();
|
||||
verifyNotContainInterfaceMembers();
|
||||
|
||||
// from interface scope
|
||||
goToMarkAndGeneralVerify('interface');
|
||||
verifyNotContainClassMembers();
|
||||
verifyNotContainFunctionMembers();
|
||||
@ -1,275 +1,275 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////module mod1 {
|
||||
//// var mod1var = 1;
|
||||
//// function mod1fn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class mod1cls {
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface mod1int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module mod1mod {
|
||||
//// var m1X = 1;
|
||||
//// function m1Func() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class m1Class {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface m1Int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export var m1eX = 1;
|
||||
//// export function m1eFunc() {
|
||||
//// }
|
||||
//// export class m1eClass {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface m1eInt {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module m1Mod { }
|
||||
//// export module m1eMod { }
|
||||
//// }
|
||||
//// export var mod1evar = 1;
|
||||
//// export function mod1efn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// export class mod1ecls {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface mod1eint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export module mod1emod {
|
||||
//// var mX = 1;
|
||||
//// function mFunc() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class mClass {
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface mInt {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export var meX = 1;
|
||||
//// export function meFunc() {
|
||||
//// }
|
||||
//// export class meClass {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface meInt {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module mMod { }
|
||||
//// export module meMod { }
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////// EXTENDING MODULE 1
|
||||
////module mod1 {
|
||||
//// export var mod1eexvar = 1;
|
||||
//// var mod1exvar = 2;
|
||||
////}
|
||||
////
|
||||
////module mod2 {
|
||||
//// var mod2var = "shadow";
|
||||
//// function mod2fn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class mod2cls {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// module mod2mod { }
|
||||
//// interface mod2int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export var mod2evar = 1;
|
||||
//// export function mod2efn() {
|
||||
//// }
|
||||
//// export class mod2ecls {
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface mod2eint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export module mod2emod { }
|
||||
////}
|
||||
////
|
||||
////module mod2 {
|
||||
//// export var mod2eexvar = 1;
|
||||
////}
|
||||
////
|
||||
////module mod3 {
|
||||
//// var shwvar = "shadow";
|
||||
//// function shwfn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class shwcls {
|
||||
//// constructor(public shadow: any) { }
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface shwint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// sivar: string;
|
||||
//// sifn(shadow: any): any;
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////function shwfn() {
|
||||
//// var sfvar = 1;
|
||||
//// function sffn() { }
|
||||
////}
|
||||
////
|
||||
////class shwcls {
|
||||
//// private scvar = 1;
|
||||
//// private scfn() { }
|
||||
//// public scpfn() { }
|
||||
//// public scpvar = 1;
|
||||
//// static scsvar = 1;
|
||||
//// static scsfn() { }
|
||||
////}
|
||||
////
|
||||
////interface shwint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// sivar: any;
|
||||
//// sifn(bar: any): any;
|
||||
////}
|
||||
////
|
||||
////var shwvar = 1;
|
||||
////
|
||||
////class extCls extends shwcls {
|
||||
//// /*extendedClass*/
|
||||
////}
|
||||
////
|
||||
////function shwFnTest() {
|
||||
//// function shwFnTest {
|
||||
////
|
||||
//// }
|
||||
//// var shwvar = "1";
|
||||
//// /*localVar*/
|
||||
////}
|
||||
////
|
||||
////var obj = {
|
||||
//// x: /*objectLiteral*/
|
||||
////}
|
||||
|
||||
function goToMarkerAndVerify(marker: string)
|
||||
{
|
||||
goTo.marker(marker);
|
||||
|
||||
verify.completionListContains('mod1');
|
||||
verify.completionListContains('mod2');
|
||||
verify.completionListContains('mod3');
|
||||
verify.completionListContains('shwvar', '(var) shwvar: number');
|
||||
verify.completionListContains('shwfn', '(function) shwfn(): void');
|
||||
verify.completionListContains('shwcls', 'class shwcls');
|
||||
verify.completionListContains('shwint', 'interface shwint');
|
||||
|
||||
verify.not.completionListContains('mod2var');
|
||||
verify.not.completionListContains('mod2fn');
|
||||
verify.not.completionListContains('mod2cls');
|
||||
verify.not.completionListContains('mod2int');
|
||||
verify.not.completionListContains('mod2mod');
|
||||
verify.not.completionListContains('mod2evar');
|
||||
verify.not.completionListContains('mod2efn');
|
||||
verify.not.completionListContains('mod2ecls');
|
||||
verify.not.completionListContains('mod2eint');
|
||||
verify.not.completionListContains('mod2emod');
|
||||
verify.not.completionListContains('sfvar');
|
||||
verify.not.completionListContains('sffn');
|
||||
verify.not.completionListContains('scvar');
|
||||
verify.not.completionListContains('scfn');
|
||||
verify.not.completionListContains('scpfn');
|
||||
verify.not.completionListContains('scpvar');
|
||||
verify.not.completionListContains('scsvar');
|
||||
verify.not.completionListContains('scsfn');
|
||||
verify.not.completionListContains('sivar');
|
||||
verify.not.completionListContains('sifn');
|
||||
verify.not.completionListContains('mod1exvar');
|
||||
verify.not.completionListContains('mod2eexvar');
|
||||
}
|
||||
|
||||
goToMarkerAndVerify('extendedClass');
|
||||
|
||||
goToMarkerAndVerify('objectLiteral');
|
||||
|
||||
goTo.marker('localVar');
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////module mod1 {
|
||||
//// var mod1var = 1;
|
||||
//// function mod1fn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class mod1cls {
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface mod1int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module mod1mod {
|
||||
//// var m1X = 1;
|
||||
//// function m1Func() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class m1Class {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface m1Int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export var m1eX = 1;
|
||||
//// export function m1eFunc() {
|
||||
//// }
|
||||
//// export class m1eClass {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface m1eInt {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module m1Mod { }
|
||||
//// export module m1eMod { }
|
||||
//// }
|
||||
//// export var mod1evar = 1;
|
||||
//// export function mod1efn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// export class mod1ecls {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface mod1eint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export module mod1emod {
|
||||
//// var mX = 1;
|
||||
//// function mFunc() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class mClass {
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface mInt {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export var meX = 1;
|
||||
//// export function meFunc() {
|
||||
//// }
|
||||
//// export class meClass {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface meInt {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// module mMod { }
|
||||
//// export module meMod { }
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////// EXTENDING MODULE 1
|
||||
////module mod1 {
|
||||
//// export var mod1eexvar = 1;
|
||||
//// var mod1exvar = 2;
|
||||
////}
|
||||
////
|
||||
////module mod2 {
|
||||
//// var mod2var = "shadow";
|
||||
//// function mod2fn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class mod2cls {
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// module mod2mod { }
|
||||
//// interface mod2int {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export var mod2evar = 1;
|
||||
//// export function mod2efn() {
|
||||
//// }
|
||||
//// export class mod2ecls {
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// export interface mod2eint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// bar: any;
|
||||
//// foob(bar: any): any;
|
||||
//// }
|
||||
//// export module mod2emod { }
|
||||
////}
|
||||
////
|
||||
////module mod2 {
|
||||
//// export var mod2eexvar = 1;
|
||||
////}
|
||||
////
|
||||
////module mod3 {
|
||||
//// var shwvar = "shadow";
|
||||
//// function shwfn() {
|
||||
//// var bar = 1;
|
||||
//// function foob() { }
|
||||
//// }
|
||||
//// class shwcls {
|
||||
//// constructor(public shadow: any) { }
|
||||
//// private cVar = 1;
|
||||
//// public cFunc() { }
|
||||
//// public ceFunc() { }
|
||||
//// public ceVar = 1;
|
||||
//// static csVar = 1;
|
||||
//// static csFunc() { }
|
||||
//// }
|
||||
//// interface shwint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// sivar: string;
|
||||
//// sifn(shadow: any): any;
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////function shwfn() {
|
||||
//// var sfvar = 1;
|
||||
//// function sffn() { }
|
||||
////}
|
||||
////
|
||||
////class shwcls {
|
||||
//// private scvar = 1;
|
||||
//// private scfn() { }
|
||||
//// public scpfn() { }
|
||||
//// public scpvar = 1;
|
||||
//// static scsvar = 1;
|
||||
//// static scsfn() { }
|
||||
////}
|
||||
////
|
||||
////interface shwint {
|
||||
//// (bar: any): any;
|
||||
//// new (bar: any): any;
|
||||
//// sivar: any;
|
||||
//// sifn(bar: any): any;
|
||||
////}
|
||||
////
|
||||
////var shwvar = 1;
|
||||
////
|
||||
////class extCls extends shwcls {
|
||||
//// /*extendedClass*/
|
||||
////}
|
||||
////
|
||||
////function shwFnTest() {
|
||||
//// function shwFnTest {
|
||||
////
|
||||
//// }
|
||||
//// var shwvar = "1";
|
||||
//// /*localVar*/
|
||||
////}
|
||||
////
|
||||
////var obj = {
|
||||
//// x: /*objectLiteral*/
|
||||
////}
|
||||
|
||||
function goToMarkerAndVerify(marker: string)
|
||||
{
|
||||
goTo.marker(marker);
|
||||
|
||||
verify.completionListContains('mod1');
|
||||
verify.completionListContains('mod2');
|
||||
verify.completionListContains('mod3');
|
||||
verify.completionListContains('shwvar', '(var) shwvar: number');
|
||||
verify.completionListContains('shwfn', '(function) shwfn(): void');
|
||||
verify.completionListContains('shwcls', 'class shwcls');
|
||||
verify.completionListContains('shwint', 'interface shwint');
|
||||
|
||||
verify.not.completionListContains('mod2var');
|
||||
verify.not.completionListContains('mod2fn');
|
||||
verify.not.completionListContains('mod2cls');
|
||||
verify.not.completionListContains('mod2int');
|
||||
verify.not.completionListContains('mod2mod');
|
||||
verify.not.completionListContains('mod2evar');
|
||||
verify.not.completionListContains('mod2efn');
|
||||
verify.not.completionListContains('mod2ecls');
|
||||
verify.not.completionListContains('mod2eint');
|
||||
verify.not.completionListContains('mod2emod');
|
||||
verify.not.completionListContains('sfvar');
|
||||
verify.not.completionListContains('sffn');
|
||||
verify.not.completionListContains('scvar');
|
||||
verify.not.completionListContains('scfn');
|
||||
verify.not.completionListContains('scpfn');
|
||||
verify.not.completionListContains('scpvar');
|
||||
verify.not.completionListContains('scsvar');
|
||||
verify.not.completionListContains('scsfn');
|
||||
verify.not.completionListContains('sivar');
|
||||
verify.not.completionListContains('sifn');
|
||||
verify.not.completionListContains('mod1exvar');
|
||||
verify.not.completionListContains('mod2eexvar');
|
||||
}
|
||||
|
||||
goToMarkerAndVerify('extendedClass');
|
||||
|
||||
goToMarkerAndVerify('objectLiteral');
|
||||
|
||||
goTo.marker('localVar');
|
||||
verify.completionListContains('shwvar', '(local var) shwvar: string');
|
||||
@ -1,21 +1,21 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////interface ig {
|
||||
//// module(data): ig;
|
||||
//// requires(data): ig;
|
||||
//// defines(data): ig;
|
||||
////}
|
||||
////
|
||||
////var ig: ig;
|
||||
////ig.module(
|
||||
//// 'mything'
|
||||
////).requires(
|
||||
//// 'otherstuff'
|
||||
////).defines(/*0*//*1*/
|
||||
////});
|
||||
|
||||
goTo.marker("1");
|
||||
edit.insert("\r\n");
|
||||
goTo.marker("0");
|
||||
// Won't-fixed: Smart indent during chained function calls
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////interface ig {
|
||||
//// module(data): ig;
|
||||
//// requires(data): ig;
|
||||
//// defines(data): ig;
|
||||
////}
|
||||
////
|
||||
////var ig: ig;
|
||||
////ig.module(
|
||||
//// 'mything'
|
||||
////).requires(
|
||||
//// 'otherstuff'
|
||||
////).defines(/*0*//*1*/
|
||||
////});
|
||||
|
||||
goTo.marker("1");
|
||||
edit.insert("\r\n");
|
||||
goTo.marker("0");
|
||||
// Won't-fixed: Smart indent during chained function calls
|
||||
verify.indentationIs(4);
|
||||
@ -1,11 +1,11 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////foo({
|
||||
////}, {/*1*/
|
||||
////});/*2*/
|
||||
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("}, {");
|
||||
goTo.marker("2");
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////foo({
|
||||
////}, {/*1*/
|
||||
////});/*2*/
|
||||
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("}, {");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs(" });");
|
||||
@ -1,5 +1,5 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
//// class A {
|
||||
//// foo: string;
|
||||
//// }
|
||||
|
||||
@ -4,10 +4,10 @@
|
||||
////var obj: { f<T>(x: T): T } = { f: <S>(/*1*/x) => x };
|
||||
////var obj2: <T>(x: T) => T = <S>(/*2*/x) => x;
|
||||
////
|
||||
////class C<T> {
|
||||
//// obj: <T>(x: T) => T
|
||||
////}
|
||||
////var c = new C();
|
||||
////class C<T> {
|
||||
//// obj: <T>(x: T) => T
|
||||
////}
|
||||
////var c = new C();
|
||||
////c.obj = <S>(/*3*/x) => x;
|
||||
|
||||
goTo.marker('1');
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
// @Filename: b.ts
|
||||
////import n = require('a/*1*/');
|
||||
|
||||
@ -1,24 +1,24 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// interface A { a: number; }
|
||||
//// interface B { b: number; }
|
||||
////
|
||||
//// interface I /*del*/extends A { }
|
||||
//// interface I extends B { }
|
||||
////
|
||||
//// var i: I;
|
||||
//// class C /*delImplements*/implements A { }
|
||||
//// var c: C;
|
||||
//// c.a;
|
||||
|
||||
goTo.marker('del');
|
||||
edit.deleteAtCaret('extends A'.length);
|
||||
|
||||
goTo.eof();
|
||||
edit.insert("var a = i.a;");
|
||||
|
||||
goTo.marker('delImplements');
|
||||
edit.deleteAtCaret('implements A'.length);
|
||||
|
||||
goTo.marker('del');
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// interface A { a: number; }
|
||||
//// interface B { b: number; }
|
||||
////
|
||||
//// interface I /*del*/extends A { }
|
||||
//// interface I extends B { }
|
||||
////
|
||||
//// var i: I;
|
||||
//// class C /*delImplements*/implements A { }
|
||||
//// var c: C;
|
||||
//// c.a;
|
||||
|
||||
goTo.marker('del');
|
||||
edit.deleteAtCaret('extends A'.length);
|
||||
|
||||
goTo.eof();
|
||||
edit.insert("var a = i.a;");
|
||||
|
||||
goTo.marker('delImplements');
|
||||
edit.deleteAtCaret('implements A'.length);
|
||||
|
||||
goTo.marker('del');
|
||||
edit.insert('extends A');
|
||||
@ -1,64 +1,64 @@
|
||||
/// <reference path="../fourslash.ts" />
|
||||
|
||||
////
|
||||
////
|
||||
//// /////////////////////////////
|
||||
//// /// Windows Script Host APIS
|
||||
//// /////////////////////////////
|
||||
////
|
||||
//// declare var ActiveXObject: { new (s: string): any; };
|
||||
////
|
||||
//// interface ITextWriter {
|
||||
//// WriteLine(s): void;
|
||||
//// }
|
||||
////
|
||||
//// declare var WScript: {
|
||||
//// Echo(s): void;
|
||||
//// StdErr: ITextWriter;
|
||||
//// Arguments: { length: number; Item(): string; };
|
||||
//// ScriptFullName: string;
|
||||
//// Quit(): number;
|
||||
//// }
|
||||
////
|
||||
|
||||
|
||||
goTo.file(0);
|
||||
|
||||
// :
|
||||
// : |--- go here
|
||||
// 1:
|
||||
// 2:
|
||||
goTo.position(0);
|
||||
|
||||
// :
|
||||
// : |--- delete "\n\n///..."
|
||||
// 1:
|
||||
// 2:
|
||||
debugger;
|
||||
edit.deleteAtCaret(100);
|
||||
|
||||
|
||||
// 12:
|
||||
// : |--- go here
|
||||
// 13: declare var WScript: {
|
||||
// 14: Echo(s): void;
|
||||
goTo.position(198);
|
||||
|
||||
// 12:
|
||||
// : |--- delete "declare..."
|
||||
// 13: declare var WScript: {
|
||||
// 14: Echo(s): void;
|
||||
edit.deleteAtCaret(16);
|
||||
|
||||
|
||||
// 9: StdErr: ITextWriter;
|
||||
// : |--- go here
|
||||
// 10: Arguments: { length: number; Item(): string; };
|
||||
// 11: ScriptFullName: string;
|
||||
goTo.position(198);
|
||||
|
||||
// 9: StdErr: ITextWriter;
|
||||
// : |--- insert "Item(): string; "
|
||||
// 10: Arguments: { length: number; Item(): string; };
|
||||
// 11: ScriptFullName: string;
|
||||
edit.insert("Item(): string; ");
|
||||
/// <reference path="../fourslash.ts" />
|
||||
|
||||
////
|
||||
////
|
||||
//// /////////////////////////////
|
||||
//// /// Windows Script Host APIS
|
||||
//// /////////////////////////////
|
||||
////
|
||||
//// declare var ActiveXObject: { new (s: string): any; };
|
||||
////
|
||||
//// interface ITextWriter {
|
||||
//// WriteLine(s): void;
|
||||
//// }
|
||||
////
|
||||
//// declare var WScript: {
|
||||
//// Echo(s): void;
|
||||
//// StdErr: ITextWriter;
|
||||
//// Arguments: { length: number; Item(): string; };
|
||||
//// ScriptFullName: string;
|
||||
//// Quit(): number;
|
||||
//// }
|
||||
////
|
||||
|
||||
|
||||
goTo.file(0);
|
||||
|
||||
// :
|
||||
// : |--- go here
|
||||
// 1:
|
||||
// 2:
|
||||
goTo.position(0);
|
||||
|
||||
// :
|
||||
// : |--- delete "\n\n///..."
|
||||
// 1:
|
||||
// 2:
|
||||
debugger;
|
||||
edit.deleteAtCaret(100);
|
||||
|
||||
|
||||
// 12:
|
||||
// : |--- go here
|
||||
// 13: declare var WScript: {
|
||||
// 14: Echo(s): void;
|
||||
goTo.position(198);
|
||||
|
||||
// 12:
|
||||
// : |--- delete "declare..."
|
||||
// 13: declare var WScript: {
|
||||
// 14: Echo(s): void;
|
||||
edit.deleteAtCaret(16);
|
||||
|
||||
|
||||
// 9: StdErr: ITextWriter;
|
||||
// : |--- go here
|
||||
// 10: Arguments: { length: number; Item(): string; };
|
||||
// 11: ScriptFullName: string;
|
||||
goTo.position(198);
|
||||
|
||||
// 9: StdErr: ITextWriter;
|
||||
// : |--- insert "Item(): string; "
|
||||
// 10: Arguments: { length: number; Item(): string; };
|
||||
// 11: ScriptFullName: string;
|
||||
edit.insert("Item(): string; ");
|
||||
|
||||
@ -9,6 +9,6 @@
|
||||
//// var q1: Query<number>;
|
||||
//// var q2: Query2<number>;
|
||||
//// q1 = q2;
|
||||
|
||||
goTo.marker();
|
||||
edit.deleteAtCaret(1);
|
||||
|
||||
goTo.marker();
|
||||
edit.deleteAtCaret(1);
|
||||
|
||||
@ -1,25 +1,25 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// module A
|
||||
//// {
|
||||
//// class B
|
||||
//// {
|
||||
//// public Hello(): string
|
||||
//// {
|
||||
//// return "from private B";
|
||||
//// }
|
||||
//// }
|
||||
//// }
|
||||
////
|
||||
//// module A
|
||||
//// {
|
||||
//// /*1*/
|
||||
//// }
|
||||
|
||||
edit.disableFormatting();
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
edit.insert(" export class B\n {\n public Hello(): string\n {\n return \"from export B\";\n }\n }\n");
|
||||
|
||||
edit.insert("\n");
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// module A
|
||||
//// {
|
||||
//// class B
|
||||
//// {
|
||||
//// public Hello(): string
|
||||
//// {
|
||||
//// return "from private B";
|
||||
//// }
|
||||
//// }
|
||||
//// }
|
||||
////
|
||||
//// module A
|
||||
//// {
|
||||
//// /*1*/
|
||||
//// }
|
||||
|
||||
edit.disableFormatting();
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
edit.insert(" export class B\n {\n public Hello(): string\n {\n return \"from export B\";\n }\n }\n");
|
||||
|
||||
edit.insert("\n");
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// class A<B, /**/B> { }
|
||||
|
||||
goTo.marker();
|
||||
verify.quickInfoExists();
|
||||
|
||||
|
||||
goTo.marker();
|
||||
verify.quickInfoExists();
|
||||
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////class SomeObj {
|
||||
//// public n = 5;
|
||||
////
|
||||
//// public getCallback() {
|
||||
//// return () => this.n;
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////var x = new SomeObj();
|
||||
////var y = x.getCallback()();
|
||||
|
||||
verify.eval('y', 5);
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////class SomeObj {
|
||||
//// public n = 5;
|
||||
////
|
||||
//// public getCallback() {
|
||||
//// return () => this.n;
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////var x = new SomeObj();
|
||||
////var y = x.getCallback()();
|
||||
|
||||
verify.eval('y', 5);
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// module M {
|
||||
//// /*1*/class C<T> { }
|
||||
//// }
|
||||
////
|
||||
//// var x = new M.C<string>();
|
||||
////
|
||||
|
||||
edit.disableFormatting();
|
||||
|
||||
goTo.marker("1");
|
||||
edit.insert("export ");
|
||||
goTo.marker("1");
|
||||
|
||||
edit.deleteAtCaret(8);
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// module M {
|
||||
//// /*1*/class C<T> { }
|
||||
//// }
|
||||
////
|
||||
//// var x = new M.C<string>();
|
||||
////
|
||||
|
||||
edit.disableFormatting();
|
||||
|
||||
goTo.marker("1");
|
||||
edit.insert("export ");
|
||||
goTo.marker("1");
|
||||
|
||||
edit.deleteAtCaret(8);
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface IExec {
|
||||
//// exec: (filename: string, cmdLine: string) => boolean;
|
||||
////}
|
||||
////class /*1*/NodeExec/*2*/ implements IExec { }
|
||||
|
||||
verify.errorExistsBetweenMarkers("1", "2");
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface IExec {
|
||||
//// exec: (filename: string, cmdLine: string) => boolean;
|
||||
////}
|
||||
////class /*1*/NodeExec/*2*/ implements IExec { }
|
||||
|
||||
verify.errorExistsBetweenMarkers("1", "2");
|
||||
verify.numberOfErrorsInCurrentFile(1);
|
||||
@ -1,4 +1,4 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////function [|__foo|]() {
|
||||
//// [|__foo|]();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////(function [|__foo|]() {
|
||||
//// [|__foo|]();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////(function [|___foo|]() {
|
||||
//// [|___foo|]();
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////var v30 = [1, 2], v31, v32, v33 = [0], v34 = {'a': true}, v35;/**/
|
||||
|
||||
format.document();
|
||||
goTo.marker("");
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////var v30 = [1, 2], v31, v32, v33 = [0], v34 = {'a': true}, v35;/**/
|
||||
|
||||
format.document();
|
||||
goTo.marker("");
|
||||
verify.currentLineContentIs("var v30 = [1, 2], v31, v32, v33 = [0], v34 = { 'a': true }, v35;");
|
||||
@ -1,16 +1,16 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////class foo {/*1*/
|
||||
//// constructor (n?: number, m = 5, o?: string) { }/*2*/
|
||||
//// x:number = 1?2:3;/*3*/
|
||||
////}/*4*/
|
||||
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("class foo {");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs(" constructor(n?: number, m = 5, o?: string) { }");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs(" x: number = 1 ? 2 : 3;");
|
||||
goTo.marker("4");
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////class foo {/*1*/
|
||||
//// constructor (n?: number, m = 5, o?: string) { }/*2*/
|
||||
//// x:number = 1?2:3;/*3*/
|
||||
////}/*4*/
|
||||
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("class foo {");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs(" constructor(n?: number, m = 5, o?: string) { }");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs(" x: number = 1 ? 2 : 3;");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs("}");
|
||||
@ -1,9 +1,9 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////if (true)/**/
|
||||
////{
|
||||
////}
|
||||
|
||||
format.document();
|
||||
goTo.marker();
|
||||
////}
|
||||
|
||||
format.document();
|
||||
goTo.marker();
|
||||
verify.currentLineContentIs("if (true) {");
|
||||
@ -1,10 +1,10 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////if(false){debugger;}
|
||||
//// if ( false ) { debugger ; }
|
||||
|
||||
format.document();
|
||||
goTo.bof();
|
||||
verify.currentLineContentIs("if (false) { debugger; }");
|
||||
goTo.eof();
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////if(false){debugger;}
|
||||
//// if ( false ) { debugger ; }
|
||||
|
||||
format.document();
|
||||
goTo.bof();
|
||||
verify.currentLineContentIs("if (false) { debugger; }");
|
||||
goTo.eof();
|
||||
verify.currentLineContentIs("if (false) { debugger; }");
|
||||
@ -1,8 +1,8 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////{}
|
||||
|
||||
goTo.eof();
|
||||
edit.insert("\r\n");
|
||||
goTo.bof();
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////{}
|
||||
|
||||
goTo.eof();
|
||||
edit.insert("\r\n");
|
||||
goTo.bof();
|
||||
verify.currentLineContentIs("{ }");
|
||||
@ -1,5 +1,5 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
////function f( f: function){/*1*/
|
||||
goTo.marker("1");
|
||||
edit.insert("}");
|
||||
/// <reference path='fourslash.ts' />
|
||||
////function f( f: function){/*1*/
|
||||
goTo.marker("1");
|
||||
edit.insert("}");
|
||||
verify.currentLineContentIs("function f(f: function){ }")
|
||||
@ -1,11 +1,11 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
//// export class A {
|
||||
////
|
||||
//// }
|
||||
|
||||
format.document();
|
||||
goTo.bof();
|
||||
verify.currentLineContentIs("export class A {");
|
||||
goTo.eof();
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
//// export class A {
|
||||
////
|
||||
//// }
|
||||
|
||||
format.document();
|
||||
goTo.bof();
|
||||
verify.currentLineContentIs("export class A {");
|
||||
goTo.eof();
|
||||
verify.currentLineContentIs("}");
|
||||
@ -1,18 +1,18 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////module Foo {/*1*/
|
||||
////}/*2*/
|
||||
////
|
||||
////import bar = Foo;/*3*/
|
||||
////
|
||||
////import bar2=Foo;/*4*/
|
||||
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("module Foo {");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs("import bar = Foo;");
|
||||
goTo.marker("4");
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////module Foo {/*1*/
|
||||
////}/*2*/
|
||||
////
|
||||
////import bar = Foo;/*3*/
|
||||
////
|
||||
////import bar2=Foo;/*4*/
|
||||
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("module Foo {");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs("import bar = Foo;");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs("import bar2 = Foo;");
|
||||
@ -1,21 +1,21 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////module A
|
||||
////{
|
||||
//// class B {
|
||||
//// /*1*/
|
||||
////}
|
||||
|
||||
format.setOption("PlaceOpenBraceOnNewLineForControlBlocks", true);
|
||||
format.setOption("PlaceOpenBraceOnNewLineForFunctions", true);
|
||||
goTo.marker("1");
|
||||
edit.insert("}");
|
||||
|
||||
verify.currentFileContentIs(
|
||||
"module A\n\
|
||||
{\n\
|
||||
class B\n\
|
||||
{\n\
|
||||
}\n\
|
||||
}"
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////module A
|
||||
////{
|
||||
//// class B {
|
||||
//// /*1*/
|
||||
////}
|
||||
|
||||
format.setOption("PlaceOpenBraceOnNewLineForControlBlocks", true);
|
||||
format.setOption("PlaceOpenBraceOnNewLineForFunctions", true);
|
||||
goTo.marker("1");
|
||||
edit.insert("}");
|
||||
|
||||
verify.currentFileContentIs(
|
||||
"module A\n\
|
||||
{\n\
|
||||
class B\n\
|
||||
{\n\
|
||||
}\n\
|
||||
}"
|
||||
);
|
||||
@ -1,13 +1,13 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////if (true) {
|
||||
//// //
|
||||
//// /*begin*/
|
||||
//// //
|
||||
//// ;
|
||||
////
|
||||
//// }/*end*/
|
||||
|
||||
format.selection('begin', 'end');
|
||||
|
||||
verify.currentFileContentIs("if (true) { \n // \n\n // \n ;\n\n}");
|
||||
//// //
|
||||
//// /*begin*/
|
||||
//// //
|
||||
//// ;
|
||||
////
|
||||
//// }/*end*/
|
||||
|
||||
format.selection('begin', 'end');
|
||||
|
||||
verify.currentFileContentIs("if (true) { \n // \n\n // \n ;\n\n}");
|
||||
|
||||
@ -1,40 +1,40 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////*1*/var fun1 = function ( ) {
|
||||
/////*2*/ var x = 'foo' ,
|
||||
/////*3*/ z = 'bar' ;
|
||||
/////*4*/ return x ;
|
||||
/////*5*/},
|
||||
////
|
||||
/////*6*/fun2 = ( function ( f ) {
|
||||
/////*7*/ var fun = function ( ) {
|
||||
/////*8*/ console . log ( f ( ) ) ;
|
||||
/////*9*/ },
|
||||
/////*10*/ x = 'Foo' ;
|
||||
/////*11*/ return fun ;
|
||||
/////*12*/} ( fun1 ) ) ;
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("var fun1 = function() {");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs(" var x = 'foo',");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs(" z = 'bar';");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs(" return x;");
|
||||
goTo.marker("5");
|
||||
verify.currentLineContentIs("},");
|
||||
goTo.marker("6");
|
||||
verify.currentLineContentIs(" fun2 = (function(f) {");
|
||||
goTo.marker("7");
|
||||
verify.currentLineContentIs(" var fun = function() {");
|
||||
goTo.marker("8");
|
||||
verify.currentLineContentIs(" console.log(f());");
|
||||
goTo.marker("9");
|
||||
verify.currentLineContentIs(" },");
|
||||
goTo.marker("10");
|
||||
verify.currentLineContentIs(" x = 'Foo';");
|
||||
goTo.marker("11");
|
||||
verify.currentLineContentIs(" return fun;");
|
||||
goTo.marker("12");
|
||||
verify.currentLineContentIs(" } (fun1));");
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////*1*/var fun1 = function ( ) {
|
||||
/////*2*/ var x = 'foo' ,
|
||||
/////*3*/ z = 'bar' ;
|
||||
/////*4*/ return x ;
|
||||
/////*5*/},
|
||||
////
|
||||
/////*6*/fun2 = ( function ( f ) {
|
||||
/////*7*/ var fun = function ( ) {
|
||||
/////*8*/ console . log ( f ( ) ) ;
|
||||
/////*9*/ },
|
||||
/////*10*/ x = 'Foo' ;
|
||||
/////*11*/ return fun ;
|
||||
/////*12*/} ( fun1 ) ) ;
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("var fun1 = function() {");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs(" var x = 'foo',");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs(" z = 'bar';");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs(" return x;");
|
||||
goTo.marker("5");
|
||||
verify.currentLineContentIs("},");
|
||||
goTo.marker("6");
|
||||
verify.currentLineContentIs(" fun2 = (function(f) {");
|
||||
goTo.marker("7");
|
||||
verify.currentLineContentIs(" var fun = function() {");
|
||||
goTo.marker("8");
|
||||
verify.currentLineContentIs(" console.log(f());");
|
||||
goTo.marker("9");
|
||||
verify.currentLineContentIs(" },");
|
||||
goTo.marker("10");
|
||||
verify.currentLineContentIs(" x = 'Foo';");
|
||||
goTo.marker("11");
|
||||
verify.currentLineContentIs(" return fun;");
|
||||
goTo.marker("12");
|
||||
verify.currentLineContentIs(" } (fun1));");
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////with /*1*/(foo.bar)
|
||||
////
|
||||
//// {/*2*/
|
||||
////
|
||||
//// }/*3*/
|
||||
////
|
||||
////with (bar.blah)/*4*/
|
||||
////{/*5*/
|
||||
////}/*6*/
|
||||
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////with /*1*/(foo.bar)
|
||||
////
|
||||
//// {/*2*/
|
||||
////
|
||||
//// }/*3*/
|
||||
////
|
||||
////with (bar.blah)/*4*/
|
||||
////{/*5*/
|
||||
////}/*6*/
|
||||
|
||||
format.setOption("PlaceOpenBraceOnNewLineForControlBlocks", false);
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
@ -19,15 +19,15 @@ verify.currentLineContentIs("}");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs("with (bar.blah) {");
|
||||
goTo.marker("6");
|
||||
verify.currentLineContentIs("}");
|
||||
|
||||
format.setOption("PlaceOpenBraceOnNewLineForControlBlocks", true);
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("with (foo.bar)");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs("{");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs("with (bar.blah)");
|
||||
goTo.marker("5");
|
||||
verify.currentLineContentIs("}");
|
||||
|
||||
format.setOption("PlaceOpenBraceOnNewLineForControlBlocks", true);
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("with (foo.bar)");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs("{");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs("with (bar.blah)");
|
||||
goTo.marker("5");
|
||||
verify.currentLineContentIs("{");
|
||||
@ -1,290 +1,290 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////// valid
|
||||
//// ( ) => 1 ;/*1*/
|
||||
//// ( arg ) => 2 ;/*2*/
|
||||
//// arg => 2 ;/*3*/
|
||||
//// ( arg = 1 ) => 3 ;/*4*/
|
||||
//// ( arg ? ) => 4 ;/*5*/
|
||||
//// ( arg : number ) => 5 ;/*6*/
|
||||
//// ( arg : number = 0 ) => 6 ;/*7*/
|
||||
//// ( arg ? : number ) => 7 ;/*8*/
|
||||
//// ( ... arg : number [ ] ) => 8 ;/*9*/
|
||||
//// ( arg1 , arg2 ) => 12 ;/*10*/
|
||||
//// ( arg1 = 1 , arg2 =3 ) => 13 ;/*11*/
|
||||
//// ( arg1 ? , arg2 ? ) => 14 ;/*12*/
|
||||
//// ( arg1 : number , arg2 : number ) => 15 ;/*13*/
|
||||
//// ( arg1 : number = 0 , arg2 : number = 1 ) => 16 ;/*14*/
|
||||
//// ( arg1 ? : number , arg2 ? : number ) => 17 ;/*15*/
|
||||
//// ( arg1 , ... arg2 : number [ ] ) => 18 ;/*16*/
|
||||
//// ( arg1 , arg2 ? : number ) => 19 ;/*17*/
|
||||
////
|
||||
////// in paren
|
||||
//// ( ( ) => 21 ) ;/*18*/
|
||||
//// ( ( arg ) => 22 ) ;/*19*/
|
||||
//// ( ( arg = 1 ) => 23 ) ;/*20*/
|
||||
//// ( ( arg ? ) => 24 ) ;/*21*/
|
||||
//// ( ( arg : number ) => 25 ) ;/*22*/
|
||||
//// ( ( arg : number = 0 ) => 26 ) ;/*23*/
|
||||
//// ( ( arg ? : number ) => 27 ) ;/*24*/
|
||||
//// ( ( ... arg : number [ ] ) => 28 ) ;/*25*/
|
||||
////
|
||||
////// in multiple paren
|
||||
//// ( ( ( ( ( arg ) => { return 32 ; } ) ) ) ) ;/*26*/
|
||||
////
|
||||
////// in ternary exression
|
||||
//// false ? ( ) => 41 : null ;/*27*/
|
||||
//// false ? ( arg ) => 42 : null ;/*28*/
|
||||
//// false ? ( arg = 1 ) => 43 : null ;/*29*/
|
||||
//// false ? ( arg ? ) => 44 : null ;/*30*/
|
||||
//// false ? ( arg : number ) => 45 : null ;/*31*/
|
||||
//// false ? ( arg ? : number ) => 46 : null ;/*32*/
|
||||
//// false ? ( arg ? : number = 0 ) => 47 : null ;/*33*/
|
||||
//// false ? ( ... arg : number [ ] ) => 48 : null ;/*34*/
|
||||
////
|
||||
////// in ternary exression within paren
|
||||
//// false ? ( ( ) => 51 ) : null ;/*35*/
|
||||
//// false ? ( ( arg ) => 52 ) : null ;/*36*/
|
||||
//// false ? ( ( arg = 1 ) => 53 ) : null ;/*37*/
|
||||
//// false ? ( ( arg ? ) => 54 ) : null ;/*38*/
|
||||
//// false ? ( ( arg : number ) => 55 ) : null ;/*39*/
|
||||
//// false ? ( ( arg ? : number ) => 56 ) : null ;/*40*/
|
||||
//// false ? ( ( arg ? : number = 0 ) => 57 ) : null ;/*41*/
|
||||
//// false ? ( ( ... arg : number [ ] ) => 58 ) : null ;/*42*/
|
||||
////
|
||||
////// ternary exression's else clause
|
||||
//// false ? null : ( ) => 61 ;/*43*/
|
||||
//// false ? null : ( arg ) => 62 ;/*44*/
|
||||
//// false ? null : ( arg = 1 ) => 63 ;/*45*/
|
||||
//// false ? null : ( arg ? ) => 64 ;/*46*/
|
||||
//// false ? null : ( arg : number ) => 65 ;/*47*/
|
||||
//// false ? null : ( arg ? : number ) => 66 ;/*48*/
|
||||
//// false ? null : ( arg ? : number = 0 ) => 67 ;/*49*/
|
||||
//// false ? null : ( ... arg : number [ ] ) => 68 ;/*50*/
|
||||
////
|
||||
////
|
||||
////// nested ternary expressions
|
||||
//// (( a ? ) => { return a ; }) ? ( b ? ) => { return b ; } : ( c ? ) => { return c ; } ;/*51*/
|
||||
////
|
||||
//////multiple levels
|
||||
//// (( a ? ) => { return a ; }) ? ( b ) => ( c ) => 81 : ( c ) => ( d ) => 82 ;/*52*/
|
||||
////
|
||||
////
|
||||
////// In Expressions
|
||||
//// ( ( arg ) => 90 ) instanceof Function ;/*53*/
|
||||
//// ( ( arg = 1 ) => 91 ) instanceof Function ;/*54*/
|
||||
//// ( ( arg ? ) => 92 ) instanceof Function ;/*55*/
|
||||
//// ( ( arg : number ) => 93 ) instanceof Function ;/*56*/
|
||||
//// ( ( arg : number = 1 ) => 94 ) instanceof Function ;/*57*/
|
||||
//// ( ( arg ? : number ) => 95 ) instanceof Function ;/*58*/
|
||||
//// ( ( ... arg : number [ ] ) => 96 ) instanceof Function ;/*59*/
|
||||
////
|
||||
////'' + (( arg ) => 100) ;/*60*/
|
||||
//// ( ( arg ) => 0 ) + '' + (( arg ) => 101) ;/*61*/
|
||||
//// ( ( arg = 1 ) => 0 ) + '' + (( arg = 2 ) => 102) ;/*62*/
|
||||
//// ( ( arg ? ) => 0 ) + '' + (( arg ? ) => 103) ;/*63*/
|
||||
//// ( ( arg : number ) => 0 ) + '' + (( arg : number ) => 104) ;/*64*/
|
||||
//// ( ( arg : number = 1 ) => 0 ) + '' + (( arg : number = 2 ) => 105) ;/*65*/
|
||||
//// ( ( arg ? : number ) => 0 ) + '' + (( arg ? : number ) => 106) ;/*66*/
|
||||
//// ( ( ... arg : number [ ] ) => 0 ) + '' + (( ... arg : number [ ] ) => 107) ;/*67*/
|
||||
//// ( ( arg1 , arg2 ? ) => 0 ) + '' + (( arg1 , arg2 ? ) => 108) ;/*68*/
|
||||
//// ( ( arg1 , ... arg2 : number [ ] ) => 0 ) + '' + (( arg1 , ... arg2 : number [ ] ) => 108) ;/*69*/
|
||||
////
|
||||
////
|
||||
////// Function Parameters
|
||||
/////*70*/function foo ( ... arg : any [ ] ) { }
|
||||
////
|
||||
/////*71*/foo (
|
||||
/////*72*/ ( a ) => 110 ,
|
||||
/////*73*/ ( ( a ) => 111 ) ,
|
||||
/////*74*/ ( a ) => {
|
||||
//// return /*75*/112 ;
|
||||
/////*76*/ } ,
|
||||
/////*77*/ ( a ? ) => 113 ,
|
||||
/////*78*/ ( a , b ? ) => 114 ,
|
||||
/////*79*/ ( a : number ) => 115 ,
|
||||
/////*80*/ ( a : number = 0 ) => 116 ,
|
||||
/////*81*/ ( a = 0 ) => 117 ,
|
||||
/////*82*/ ( a : number = 0 ) => 118 ,
|
||||
/////*83*/ ( a ? , b ? : number ) => 118 ,
|
||||
/////*84*/ ( ... a : number [ ] ) => 119 ,
|
||||
/////*85*/ ( a , b = 0 , ... c : number [ ] ) => 120 ,
|
||||
/////*86*/ ( a ) => ( b ) => ( c ) => 121 ,
|
||||
/////*87*/ false ? ( a ) => 0 : ( b ) => 122
|
||||
//// /*88*/) ;
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("() => 1;");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs("(arg) => 2;");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs("arg => 2;");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs("(arg = 1) => 3;");
|
||||
goTo.marker("5");
|
||||
verify.currentLineContentIs("(arg?) => 4;");
|
||||
goTo.marker("6");
|
||||
verify.currentLineContentIs("(arg: number) => 5;");
|
||||
goTo.marker("7");
|
||||
verify.currentLineContentIs("(arg: number = 0) => 6;");
|
||||
goTo.marker("8");
|
||||
verify.currentLineContentIs("(arg?: number) => 7;");
|
||||
goTo.marker("9");
|
||||
verify.currentLineContentIs("(...arg: number[]) => 8;");
|
||||
goTo.marker("10");
|
||||
verify.currentLineContentIs("(arg1, arg2) => 12;");
|
||||
goTo.marker("11");
|
||||
verify.currentLineContentIs("(arg1 = 1, arg2 = 3) => 13;");
|
||||
goTo.marker("12");
|
||||
verify.currentLineContentIs("(arg1?, arg2?) => 14;");
|
||||
goTo.marker("13");
|
||||
verify.currentLineContentIs("(arg1: number, arg2: number) => 15;");
|
||||
goTo.marker("14");
|
||||
verify.currentLineContentIs("(arg1: number = 0, arg2: number = 1) => 16;");
|
||||
goTo.marker("15");
|
||||
verify.currentLineContentIs("(arg1?: number, arg2?: number) => 17;");
|
||||
goTo.marker("16");
|
||||
verify.currentLineContentIs("(arg1, ...arg2: number[]) => 18;");
|
||||
goTo.marker("17");
|
||||
verify.currentLineContentIs("(arg1, arg2?: number) => 19;");
|
||||
goTo.marker("18");
|
||||
verify.currentLineContentIs("(() => 21);");
|
||||
goTo.marker("19");
|
||||
verify.currentLineContentIs("((arg) => 22);");
|
||||
goTo.marker("20");
|
||||
verify.currentLineContentIs("((arg = 1) => 23);");
|
||||
goTo.marker("21");
|
||||
verify.currentLineContentIs("((arg?) => 24);");
|
||||
goTo.marker("22");
|
||||
verify.currentLineContentIs("((arg: number) => 25);");
|
||||
goTo.marker("23");
|
||||
verify.currentLineContentIs("((arg: number = 0) => 26);");
|
||||
goTo.marker("24");
|
||||
verify.currentLineContentIs("((arg?: number) => 27);");
|
||||
goTo.marker("25");
|
||||
verify.currentLineContentIs("((...arg: number[]) => 28);");
|
||||
goTo.marker("26");
|
||||
verify.currentLineContentIs("(((((arg) => { return 32; }))));");
|
||||
goTo.marker("27");
|
||||
verify.currentLineContentIs("false ? () => 41 : null;");
|
||||
goTo.marker("28");
|
||||
verify.currentLineContentIs("false ? (arg) => 42 : null;");
|
||||
goTo.marker("29");
|
||||
verify.currentLineContentIs("false ? (arg = 1) => 43 : null;");
|
||||
goTo.marker("30");
|
||||
verify.currentLineContentIs("false ? (arg?) => 44 : null;");
|
||||
goTo.marker("31");
|
||||
verify.currentLineContentIs("false ? (arg: number) => 45 : null;");
|
||||
goTo.marker("32");
|
||||
verify.currentLineContentIs("false ? (arg?: number) => 46 : null;");
|
||||
goTo.marker("33");
|
||||
verify.currentLineContentIs("false ? (arg?: number = 0) => 47 : null;");
|
||||
goTo.marker("34");
|
||||
verify.currentLineContentIs("false ? (...arg: number[]) => 48 : null;");
|
||||
goTo.marker("35");
|
||||
verify.currentLineContentIs("false ? (() => 51) : null;");
|
||||
goTo.marker("36");
|
||||
verify.currentLineContentIs("false ? ((arg) => 52) : null;");
|
||||
goTo.marker("37");
|
||||
verify.currentLineContentIs("false ? ((arg = 1) => 53) : null;");
|
||||
goTo.marker("38");
|
||||
verify.currentLineContentIs("false ? ((arg?) => 54) : null;");
|
||||
goTo.marker("39");
|
||||
verify.currentLineContentIs("false ? ((arg: number) => 55) : null;");
|
||||
goTo.marker("40");
|
||||
verify.currentLineContentIs("false ? ((arg?: number) => 56) : null;");
|
||||
goTo.marker("41");
|
||||
verify.currentLineContentIs("false ? ((arg?: number = 0) => 57) : null;");
|
||||
goTo.marker("42");
|
||||
verify.currentLineContentIs("false ? ((...arg: number[]) => 58) : null;");
|
||||
goTo.marker("43");
|
||||
verify.currentLineContentIs("false ? null : () => 61;");
|
||||
goTo.marker("44");
|
||||
verify.currentLineContentIs("false ? null : (arg) => 62;");
|
||||
goTo.marker("45");
|
||||
verify.currentLineContentIs("false ? null : (arg = 1) => 63;");
|
||||
goTo.marker("46");
|
||||
verify.currentLineContentIs("false ? null : (arg?) => 64;");
|
||||
goTo.marker("47");
|
||||
verify.currentLineContentIs("false ? null : (arg: number) => 65;");
|
||||
goTo.marker("48");
|
||||
verify.currentLineContentIs("false ? null : (arg?: number) => 66;");
|
||||
goTo.marker("49");
|
||||
verify.currentLineContentIs("false ? null : (arg?: number = 0) => 67;");
|
||||
goTo.marker("50");
|
||||
verify.currentLineContentIs("false ? null : (...arg: number[]) => 68;");
|
||||
goTo.marker("51");
|
||||
verify.currentLineContentIs("((a?) => { return a; }) ? (b?) => { return b; } : (c?) => { return c; };");
|
||||
goTo.marker("52");
|
||||
verify.currentLineContentIs("((a?) => { return a; }) ? (b) => (c) => 81 : (c) => (d) => 82;");
|
||||
goTo.marker("53");
|
||||
verify.currentLineContentIs("((arg) => 90) instanceof Function;");
|
||||
goTo.marker("54");
|
||||
verify.currentLineContentIs("((arg = 1) => 91) instanceof Function;");
|
||||
goTo.marker("55");
|
||||
verify.currentLineContentIs("((arg?) => 92) instanceof Function;");
|
||||
goTo.marker("56");
|
||||
verify.currentLineContentIs("((arg: number) => 93) instanceof Function;");
|
||||
goTo.marker("57");
|
||||
verify.currentLineContentIs("((arg: number = 1) => 94) instanceof Function;");
|
||||
goTo.marker("58");
|
||||
verify.currentLineContentIs("((arg?: number) => 95) instanceof Function;");
|
||||
goTo.marker("59");
|
||||
verify.currentLineContentIs("((...arg: number[]) => 96) instanceof Function;");
|
||||
goTo.marker("60");
|
||||
verify.currentLineContentIs("'' + ((arg) => 100);");
|
||||
|
||||
goTo.marker("61");
|
||||
verify.currentLineContentIs("((arg) => 0) + '' + ((arg) => 101);");
|
||||
goTo.marker("62");
|
||||
verify.currentLineContentIs("((arg = 1) => 0) + '' + ((arg = 2) => 102);");
|
||||
goTo.marker("63");
|
||||
verify.currentLineContentIs("((arg?) => 0) + '' + ((arg?) => 103);");
|
||||
goTo.marker("64");
|
||||
verify.currentLineContentIs("((arg: number) => 0) + '' + ((arg: number) => 104);");
|
||||
goTo.marker("65");
|
||||
verify.currentLineContentIs("((arg: number = 1) => 0) + '' + ((arg: number = 2) => 105);");
|
||||
goTo.marker("66");
|
||||
verify.currentLineContentIs("((arg?: number) => 0) + '' + ((arg?: number) => 106);");
|
||||
goTo.marker("67");
|
||||
verify.currentLineContentIs("((...arg: number[]) => 0) + '' + ((...arg: number[]) => 107);");
|
||||
goTo.marker("68");
|
||||
verify.currentLineContentIs("((arg1, arg2?) => 0) + '' + ((arg1, arg2?) => 108);");
|
||||
goTo.marker("69");
|
||||
verify.currentLineContentIs("((arg1, ...arg2: number[]) => 0) + '' + ((arg1, ...arg2: number[]) => 108);");
|
||||
goTo.marker("70");
|
||||
verify.currentLineContentIs("function foo(...arg: any[]) { }");
|
||||
goTo.marker("71");
|
||||
verify.currentLineContentIs("foo(");
|
||||
goTo.marker("72");
|
||||
verify.currentLineContentIs(" (a) => 110,");
|
||||
goTo.marker("73");
|
||||
verify.currentLineContentIs(" ((a) => 111),");
|
||||
goTo.marker("74");
|
||||
verify.currentLineContentIs(" (a) => {");
|
||||
goTo.marker("75");
|
||||
verify.currentLineContentIs(" return 112;");
|
||||
goTo.marker("76");
|
||||
verify.currentLineContentIs(" },");
|
||||
goTo.marker("77");
|
||||
verify.currentLineContentIs(" (a?) => 113,");
|
||||
goTo.marker("78");
|
||||
verify.currentLineContentIs(" (a, b?) => 114,");
|
||||
goTo.marker("79");
|
||||
verify.currentLineContentIs(" (a: number) => 115,");
|
||||
goTo.marker("80");
|
||||
verify.currentLineContentIs(" (a: number = 0) => 116,");
|
||||
goTo.marker("81");
|
||||
verify.currentLineContentIs(" (a = 0) => 117,");
|
||||
goTo.marker("82");
|
||||
verify.currentLineContentIs(" (a: number = 0) => 118,");
|
||||
goTo.marker("83");
|
||||
verify.currentLineContentIs(" (a?, b?: number) => 118,");
|
||||
goTo.marker("84");
|
||||
verify.currentLineContentIs(" (...a: number[]) => 119,");
|
||||
goTo.marker("85");
|
||||
verify.currentLineContentIs(" (a, b = 0, ...c: number[]) => 120,");
|
||||
goTo.marker("86");
|
||||
verify.currentLineContentIs(" (a) => (b) => (c) => 121,");
|
||||
goTo.marker("87");
|
||||
verify.currentLineContentIs(" false ? (a) => 0 : (b) => 122");
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////// valid
|
||||
//// ( ) => 1 ;/*1*/
|
||||
//// ( arg ) => 2 ;/*2*/
|
||||
//// arg => 2 ;/*3*/
|
||||
//// ( arg = 1 ) => 3 ;/*4*/
|
||||
//// ( arg ? ) => 4 ;/*5*/
|
||||
//// ( arg : number ) => 5 ;/*6*/
|
||||
//// ( arg : number = 0 ) => 6 ;/*7*/
|
||||
//// ( arg ? : number ) => 7 ;/*8*/
|
||||
//// ( ... arg : number [ ] ) => 8 ;/*9*/
|
||||
//// ( arg1 , arg2 ) => 12 ;/*10*/
|
||||
//// ( arg1 = 1 , arg2 =3 ) => 13 ;/*11*/
|
||||
//// ( arg1 ? , arg2 ? ) => 14 ;/*12*/
|
||||
//// ( arg1 : number , arg2 : number ) => 15 ;/*13*/
|
||||
//// ( arg1 : number = 0 , arg2 : number = 1 ) => 16 ;/*14*/
|
||||
//// ( arg1 ? : number , arg2 ? : number ) => 17 ;/*15*/
|
||||
//// ( arg1 , ... arg2 : number [ ] ) => 18 ;/*16*/
|
||||
//// ( arg1 , arg2 ? : number ) => 19 ;/*17*/
|
||||
////
|
||||
////// in paren
|
||||
//// ( ( ) => 21 ) ;/*18*/
|
||||
//// ( ( arg ) => 22 ) ;/*19*/
|
||||
//// ( ( arg = 1 ) => 23 ) ;/*20*/
|
||||
//// ( ( arg ? ) => 24 ) ;/*21*/
|
||||
//// ( ( arg : number ) => 25 ) ;/*22*/
|
||||
//// ( ( arg : number = 0 ) => 26 ) ;/*23*/
|
||||
//// ( ( arg ? : number ) => 27 ) ;/*24*/
|
||||
//// ( ( ... arg : number [ ] ) => 28 ) ;/*25*/
|
||||
////
|
||||
////// in multiple paren
|
||||
//// ( ( ( ( ( arg ) => { return 32 ; } ) ) ) ) ;/*26*/
|
||||
////
|
||||
////// in ternary exression
|
||||
//// false ? ( ) => 41 : null ;/*27*/
|
||||
//// false ? ( arg ) => 42 : null ;/*28*/
|
||||
//// false ? ( arg = 1 ) => 43 : null ;/*29*/
|
||||
//// false ? ( arg ? ) => 44 : null ;/*30*/
|
||||
//// false ? ( arg : number ) => 45 : null ;/*31*/
|
||||
//// false ? ( arg ? : number ) => 46 : null ;/*32*/
|
||||
//// false ? ( arg ? : number = 0 ) => 47 : null ;/*33*/
|
||||
//// false ? ( ... arg : number [ ] ) => 48 : null ;/*34*/
|
||||
////
|
||||
////// in ternary exression within paren
|
||||
//// false ? ( ( ) => 51 ) : null ;/*35*/
|
||||
//// false ? ( ( arg ) => 52 ) : null ;/*36*/
|
||||
//// false ? ( ( arg = 1 ) => 53 ) : null ;/*37*/
|
||||
//// false ? ( ( arg ? ) => 54 ) : null ;/*38*/
|
||||
//// false ? ( ( arg : number ) => 55 ) : null ;/*39*/
|
||||
//// false ? ( ( arg ? : number ) => 56 ) : null ;/*40*/
|
||||
//// false ? ( ( arg ? : number = 0 ) => 57 ) : null ;/*41*/
|
||||
//// false ? ( ( ... arg : number [ ] ) => 58 ) : null ;/*42*/
|
||||
////
|
||||
////// ternary exression's else clause
|
||||
//// false ? null : ( ) => 61 ;/*43*/
|
||||
//// false ? null : ( arg ) => 62 ;/*44*/
|
||||
//// false ? null : ( arg = 1 ) => 63 ;/*45*/
|
||||
//// false ? null : ( arg ? ) => 64 ;/*46*/
|
||||
//// false ? null : ( arg : number ) => 65 ;/*47*/
|
||||
//// false ? null : ( arg ? : number ) => 66 ;/*48*/
|
||||
//// false ? null : ( arg ? : number = 0 ) => 67 ;/*49*/
|
||||
//// false ? null : ( ... arg : number [ ] ) => 68 ;/*50*/
|
||||
////
|
||||
////
|
||||
////// nested ternary expressions
|
||||
//// (( a ? ) => { return a ; }) ? ( b ? ) => { return b ; } : ( c ? ) => { return c ; } ;/*51*/
|
||||
////
|
||||
//////multiple levels
|
||||
//// (( a ? ) => { return a ; }) ? ( b ) => ( c ) => 81 : ( c ) => ( d ) => 82 ;/*52*/
|
||||
////
|
||||
////
|
||||
////// In Expressions
|
||||
//// ( ( arg ) => 90 ) instanceof Function ;/*53*/
|
||||
//// ( ( arg = 1 ) => 91 ) instanceof Function ;/*54*/
|
||||
//// ( ( arg ? ) => 92 ) instanceof Function ;/*55*/
|
||||
//// ( ( arg : number ) => 93 ) instanceof Function ;/*56*/
|
||||
//// ( ( arg : number = 1 ) => 94 ) instanceof Function ;/*57*/
|
||||
//// ( ( arg ? : number ) => 95 ) instanceof Function ;/*58*/
|
||||
//// ( ( ... arg : number [ ] ) => 96 ) instanceof Function ;/*59*/
|
||||
////
|
||||
////'' + (( arg ) => 100) ;/*60*/
|
||||
//// ( ( arg ) => 0 ) + '' + (( arg ) => 101) ;/*61*/
|
||||
//// ( ( arg = 1 ) => 0 ) + '' + (( arg = 2 ) => 102) ;/*62*/
|
||||
//// ( ( arg ? ) => 0 ) + '' + (( arg ? ) => 103) ;/*63*/
|
||||
//// ( ( arg : number ) => 0 ) + '' + (( arg : number ) => 104) ;/*64*/
|
||||
//// ( ( arg : number = 1 ) => 0 ) + '' + (( arg : number = 2 ) => 105) ;/*65*/
|
||||
//// ( ( arg ? : number ) => 0 ) + '' + (( arg ? : number ) => 106) ;/*66*/
|
||||
//// ( ( ... arg : number [ ] ) => 0 ) + '' + (( ... arg : number [ ] ) => 107) ;/*67*/
|
||||
//// ( ( arg1 , arg2 ? ) => 0 ) + '' + (( arg1 , arg2 ? ) => 108) ;/*68*/
|
||||
//// ( ( arg1 , ... arg2 : number [ ] ) => 0 ) + '' + (( arg1 , ... arg2 : number [ ] ) => 108) ;/*69*/
|
||||
////
|
||||
////
|
||||
////// Function Parameters
|
||||
/////*70*/function foo ( ... arg : any [ ] ) { }
|
||||
////
|
||||
/////*71*/foo (
|
||||
/////*72*/ ( a ) => 110 ,
|
||||
/////*73*/ ( ( a ) => 111 ) ,
|
||||
/////*74*/ ( a ) => {
|
||||
//// return /*75*/112 ;
|
||||
/////*76*/ } ,
|
||||
/////*77*/ ( a ? ) => 113 ,
|
||||
/////*78*/ ( a , b ? ) => 114 ,
|
||||
/////*79*/ ( a : number ) => 115 ,
|
||||
/////*80*/ ( a : number = 0 ) => 116 ,
|
||||
/////*81*/ ( a = 0 ) => 117 ,
|
||||
/////*82*/ ( a : number = 0 ) => 118 ,
|
||||
/////*83*/ ( a ? , b ? : number ) => 118 ,
|
||||
/////*84*/ ( ... a : number [ ] ) => 119 ,
|
||||
/////*85*/ ( a , b = 0 , ... c : number [ ] ) => 120 ,
|
||||
/////*86*/ ( a ) => ( b ) => ( c ) => 121 ,
|
||||
/////*87*/ false ? ( a ) => 0 : ( b ) => 122
|
||||
//// /*88*/) ;
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("() => 1;");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs("(arg) => 2;");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs("arg => 2;");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs("(arg = 1) => 3;");
|
||||
goTo.marker("5");
|
||||
verify.currentLineContentIs("(arg?) => 4;");
|
||||
goTo.marker("6");
|
||||
verify.currentLineContentIs("(arg: number) => 5;");
|
||||
goTo.marker("7");
|
||||
verify.currentLineContentIs("(arg: number = 0) => 6;");
|
||||
goTo.marker("8");
|
||||
verify.currentLineContentIs("(arg?: number) => 7;");
|
||||
goTo.marker("9");
|
||||
verify.currentLineContentIs("(...arg: number[]) => 8;");
|
||||
goTo.marker("10");
|
||||
verify.currentLineContentIs("(arg1, arg2) => 12;");
|
||||
goTo.marker("11");
|
||||
verify.currentLineContentIs("(arg1 = 1, arg2 = 3) => 13;");
|
||||
goTo.marker("12");
|
||||
verify.currentLineContentIs("(arg1?, arg2?) => 14;");
|
||||
goTo.marker("13");
|
||||
verify.currentLineContentIs("(arg1: number, arg2: number) => 15;");
|
||||
goTo.marker("14");
|
||||
verify.currentLineContentIs("(arg1: number = 0, arg2: number = 1) => 16;");
|
||||
goTo.marker("15");
|
||||
verify.currentLineContentIs("(arg1?: number, arg2?: number) => 17;");
|
||||
goTo.marker("16");
|
||||
verify.currentLineContentIs("(arg1, ...arg2: number[]) => 18;");
|
||||
goTo.marker("17");
|
||||
verify.currentLineContentIs("(arg1, arg2?: number) => 19;");
|
||||
goTo.marker("18");
|
||||
verify.currentLineContentIs("(() => 21);");
|
||||
goTo.marker("19");
|
||||
verify.currentLineContentIs("((arg) => 22);");
|
||||
goTo.marker("20");
|
||||
verify.currentLineContentIs("((arg = 1) => 23);");
|
||||
goTo.marker("21");
|
||||
verify.currentLineContentIs("((arg?) => 24);");
|
||||
goTo.marker("22");
|
||||
verify.currentLineContentIs("((arg: number) => 25);");
|
||||
goTo.marker("23");
|
||||
verify.currentLineContentIs("((arg: number = 0) => 26);");
|
||||
goTo.marker("24");
|
||||
verify.currentLineContentIs("((arg?: number) => 27);");
|
||||
goTo.marker("25");
|
||||
verify.currentLineContentIs("((...arg: number[]) => 28);");
|
||||
goTo.marker("26");
|
||||
verify.currentLineContentIs("(((((arg) => { return 32; }))));");
|
||||
goTo.marker("27");
|
||||
verify.currentLineContentIs("false ? () => 41 : null;");
|
||||
goTo.marker("28");
|
||||
verify.currentLineContentIs("false ? (arg) => 42 : null;");
|
||||
goTo.marker("29");
|
||||
verify.currentLineContentIs("false ? (arg = 1) => 43 : null;");
|
||||
goTo.marker("30");
|
||||
verify.currentLineContentIs("false ? (arg?) => 44 : null;");
|
||||
goTo.marker("31");
|
||||
verify.currentLineContentIs("false ? (arg: number) => 45 : null;");
|
||||
goTo.marker("32");
|
||||
verify.currentLineContentIs("false ? (arg?: number) => 46 : null;");
|
||||
goTo.marker("33");
|
||||
verify.currentLineContentIs("false ? (arg?: number = 0) => 47 : null;");
|
||||
goTo.marker("34");
|
||||
verify.currentLineContentIs("false ? (...arg: number[]) => 48 : null;");
|
||||
goTo.marker("35");
|
||||
verify.currentLineContentIs("false ? (() => 51) : null;");
|
||||
goTo.marker("36");
|
||||
verify.currentLineContentIs("false ? ((arg) => 52) : null;");
|
||||
goTo.marker("37");
|
||||
verify.currentLineContentIs("false ? ((arg = 1) => 53) : null;");
|
||||
goTo.marker("38");
|
||||
verify.currentLineContentIs("false ? ((arg?) => 54) : null;");
|
||||
goTo.marker("39");
|
||||
verify.currentLineContentIs("false ? ((arg: number) => 55) : null;");
|
||||
goTo.marker("40");
|
||||
verify.currentLineContentIs("false ? ((arg?: number) => 56) : null;");
|
||||
goTo.marker("41");
|
||||
verify.currentLineContentIs("false ? ((arg?: number = 0) => 57) : null;");
|
||||
goTo.marker("42");
|
||||
verify.currentLineContentIs("false ? ((...arg: number[]) => 58) : null;");
|
||||
goTo.marker("43");
|
||||
verify.currentLineContentIs("false ? null : () => 61;");
|
||||
goTo.marker("44");
|
||||
verify.currentLineContentIs("false ? null : (arg) => 62;");
|
||||
goTo.marker("45");
|
||||
verify.currentLineContentIs("false ? null : (arg = 1) => 63;");
|
||||
goTo.marker("46");
|
||||
verify.currentLineContentIs("false ? null : (arg?) => 64;");
|
||||
goTo.marker("47");
|
||||
verify.currentLineContentIs("false ? null : (arg: number) => 65;");
|
||||
goTo.marker("48");
|
||||
verify.currentLineContentIs("false ? null : (arg?: number) => 66;");
|
||||
goTo.marker("49");
|
||||
verify.currentLineContentIs("false ? null : (arg?: number = 0) => 67;");
|
||||
goTo.marker("50");
|
||||
verify.currentLineContentIs("false ? null : (...arg: number[]) => 68;");
|
||||
goTo.marker("51");
|
||||
verify.currentLineContentIs("((a?) => { return a; }) ? (b?) => { return b; } : (c?) => { return c; };");
|
||||
goTo.marker("52");
|
||||
verify.currentLineContentIs("((a?) => { return a; }) ? (b) => (c) => 81 : (c) => (d) => 82;");
|
||||
goTo.marker("53");
|
||||
verify.currentLineContentIs("((arg) => 90) instanceof Function;");
|
||||
goTo.marker("54");
|
||||
verify.currentLineContentIs("((arg = 1) => 91) instanceof Function;");
|
||||
goTo.marker("55");
|
||||
verify.currentLineContentIs("((arg?) => 92) instanceof Function;");
|
||||
goTo.marker("56");
|
||||
verify.currentLineContentIs("((arg: number) => 93) instanceof Function;");
|
||||
goTo.marker("57");
|
||||
verify.currentLineContentIs("((arg: number = 1) => 94) instanceof Function;");
|
||||
goTo.marker("58");
|
||||
verify.currentLineContentIs("((arg?: number) => 95) instanceof Function;");
|
||||
goTo.marker("59");
|
||||
verify.currentLineContentIs("((...arg: number[]) => 96) instanceof Function;");
|
||||
goTo.marker("60");
|
||||
verify.currentLineContentIs("'' + ((arg) => 100);");
|
||||
|
||||
goTo.marker("61");
|
||||
verify.currentLineContentIs("((arg) => 0) + '' + ((arg) => 101);");
|
||||
goTo.marker("62");
|
||||
verify.currentLineContentIs("((arg = 1) => 0) + '' + ((arg = 2) => 102);");
|
||||
goTo.marker("63");
|
||||
verify.currentLineContentIs("((arg?) => 0) + '' + ((arg?) => 103);");
|
||||
goTo.marker("64");
|
||||
verify.currentLineContentIs("((arg: number) => 0) + '' + ((arg: number) => 104);");
|
||||
goTo.marker("65");
|
||||
verify.currentLineContentIs("((arg: number = 1) => 0) + '' + ((arg: number = 2) => 105);");
|
||||
goTo.marker("66");
|
||||
verify.currentLineContentIs("((arg?: number) => 0) + '' + ((arg?: number) => 106);");
|
||||
goTo.marker("67");
|
||||
verify.currentLineContentIs("((...arg: number[]) => 0) + '' + ((...arg: number[]) => 107);");
|
||||
goTo.marker("68");
|
||||
verify.currentLineContentIs("((arg1, arg2?) => 0) + '' + ((arg1, arg2?) => 108);");
|
||||
goTo.marker("69");
|
||||
verify.currentLineContentIs("((arg1, ...arg2: number[]) => 0) + '' + ((arg1, ...arg2: number[]) => 108);");
|
||||
goTo.marker("70");
|
||||
verify.currentLineContentIs("function foo(...arg: any[]) { }");
|
||||
goTo.marker("71");
|
||||
verify.currentLineContentIs("foo(");
|
||||
goTo.marker("72");
|
||||
verify.currentLineContentIs(" (a) => 110,");
|
||||
goTo.marker("73");
|
||||
verify.currentLineContentIs(" ((a) => 111),");
|
||||
goTo.marker("74");
|
||||
verify.currentLineContentIs(" (a) => {");
|
||||
goTo.marker("75");
|
||||
verify.currentLineContentIs(" return 112;");
|
||||
goTo.marker("76");
|
||||
verify.currentLineContentIs(" },");
|
||||
goTo.marker("77");
|
||||
verify.currentLineContentIs(" (a?) => 113,");
|
||||
goTo.marker("78");
|
||||
verify.currentLineContentIs(" (a, b?) => 114,");
|
||||
goTo.marker("79");
|
||||
verify.currentLineContentIs(" (a: number) => 115,");
|
||||
goTo.marker("80");
|
||||
verify.currentLineContentIs(" (a: number = 0) => 116,");
|
||||
goTo.marker("81");
|
||||
verify.currentLineContentIs(" (a = 0) => 117,");
|
||||
goTo.marker("82");
|
||||
verify.currentLineContentIs(" (a: number = 0) => 118,");
|
||||
goTo.marker("83");
|
||||
verify.currentLineContentIs(" (a?, b?: number) => 118,");
|
||||
goTo.marker("84");
|
||||
verify.currentLineContentIs(" (...a: number[]) => 119,");
|
||||
goTo.marker("85");
|
||||
verify.currentLineContentIs(" (a, b = 0, ...c: number[]) => 120,");
|
||||
goTo.marker("86");
|
||||
verify.currentLineContentIs(" (a) => (b) => (c) => 121,");
|
||||
goTo.marker("87");
|
||||
verify.currentLineContentIs(" false ? (a) => 0 : (b) => 122");
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////declare var module/*1*/
|
||||
|
||||
goTo.marker("1");
|
||||
edit.insert(";");
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////declare var module/*1*/
|
||||
|
||||
goTo.marker("1");
|
||||
edit.insert(";");
|
||||
verify.currentLineContentIs("declare var module;");
|
||||
@ -1,4 +1,4 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
/////*1*/ module My.App {
|
||||
/////*2*/export var appModule = angular.module("app", [
|
||||
|
||||
@ -1,207 +1,207 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////*1*/ class a {
|
||||
/////*2*/ constructor ( n : number ) ;
|
||||
/////*3*/ constructor ( s : string ) ;
|
||||
/////*4*/ constructor ( ns : any ) {
|
||||
////
|
||||
/////*5*/ }
|
||||
////
|
||||
/////*6*/ public pgF ( ) { }
|
||||
////
|
||||
/////*7*/ public pv ;
|
||||
/////*8*/ public get d ( ) {
|
||||
/////*9*/ return 30 ;
|
||||
/////*10*/ }
|
||||
/////*11*/ public set d ( number ) {
|
||||
/////*12*/ }
|
||||
////
|
||||
/////*13*/ public static get p2 ( ) {
|
||||
/////*14*/ return { x : 30 , y : 40 } ;
|
||||
/////*15*/ }
|
||||
////
|
||||
/////*16*/ private static d2 ( ) {
|
||||
/////*17*/ }
|
||||
/////*18*/ private static get p3 ( ) {
|
||||
/////*19*/ return "string" ;
|
||||
/////*20*/ }
|
||||
/////*21*/ private pv3 ;
|
||||
////
|
||||
/////*22*/ private foo ( n : number ) : string ;
|
||||
/////*23*/ private foo ( s : string ) : string ;
|
||||
/////*24*/ private foo ( ns : any ) {
|
||||
/////*25*/ return ns.toString ( ) ;
|
||||
/////*26*/ }
|
||||
/////*27*/}
|
||||
////
|
||||
/////*28*/ class b extends a {
|
||||
/////*29*/}
|
||||
////
|
||||
/////*30*/ class m1b {
|
||||
////
|
||||
/////*31*/}
|
||||
////
|
||||
/////*32*/ interface m1ib {
|
||||
////
|
||||
/////*33*/ }
|
||||
/////*34*/ class c extends m1b {
|
||||
/////*35*/}
|
||||
////
|
||||
/////*36*/ class ib2 implements m1ib {
|
||||
/////*37*/}
|
||||
////
|
||||
/////*38*/ declare class aAmbient {
|
||||
/////*39*/ constructor ( n : number ) ;
|
||||
/////*40*/ constructor ( s : string ) ;
|
||||
/////*41*/ public pgF ( ) : void ;
|
||||
/////*42*/ public pv ;
|
||||
/////*43*/ public d : number ;
|
||||
/////*44*/ static p2 : { x : number ; y : number ; } ;
|
||||
/////*45*/ static d2 ( ) ;
|
||||
/////*46*/ static p3 ;
|
||||
/////*47*/ private pv3 ;
|
||||
/////*48*/ private foo ( s ) ;
|
||||
/////*49*/}
|
||||
////
|
||||
/////*50*/ class d {
|
||||
/////*51*/ private foo ( n : number ) : string ;
|
||||
/////*52*/ private foo ( s : string ) : string ;
|
||||
/////*53*/ private foo ( ns : any ) {
|
||||
/////*54*/ return ns.toString ( ) ;
|
||||
/////*55*/ }
|
||||
/////*56*/}
|
||||
////
|
||||
/////*57*/ class e {
|
||||
/////*58*/ private foo ( s : string ) : string ;
|
||||
/////*59*/ private foo ( n : number ) : string ;
|
||||
/////*60*/ private foo ( ns : any ) {
|
||||
/////*61*/ return ns.toString ( ) ;
|
||||
/////*62*/ }
|
||||
/////*63*/}
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("class a {");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs(" constructor(n: number);");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs(" constructor(s: string);");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs(" constructor(ns: any) {");
|
||||
goTo.marker("5");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("6");
|
||||
verify.currentLineContentIs(" public pgF() { }");
|
||||
goTo.marker("7");
|
||||
verify.currentLineContentIs(" public pv;");
|
||||
goTo.marker("8");
|
||||
verify.currentLineContentIs(" public get d() {");
|
||||
goTo.marker("9");
|
||||
verify.currentLineContentIs(" return 30;");
|
||||
goTo.marker("10");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("11");
|
||||
verify.currentLineContentIs(" public set d(number) {");
|
||||
goTo.marker("12");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("13");
|
||||
verify.currentLineContentIs(" public static get p2() {");
|
||||
goTo.marker("14");
|
||||
verify.currentLineContentIs(" return { x: 30, y: 40 };");
|
||||
goTo.marker("15");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("16");
|
||||
verify.currentLineContentIs(" private static d2() {");
|
||||
goTo.marker("17");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("18");
|
||||
verify.currentLineContentIs(" private static get p3() {");
|
||||
goTo.marker("19");
|
||||
verify.currentLineContentIs(' return "string";');
|
||||
goTo.marker("20");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("21");
|
||||
verify.currentLineContentIs(" private pv3;");
|
||||
goTo.marker("22");
|
||||
verify.currentLineContentIs(" private foo(n: number): string;");
|
||||
goTo.marker("23");
|
||||
verify.currentLineContentIs(" private foo(s: string): string;");
|
||||
goTo.marker("24");
|
||||
verify.currentLineContentIs(" private foo(ns: any) {");
|
||||
goTo.marker("25");
|
||||
verify.currentLineContentIs(" return ns.toString();");
|
||||
goTo.marker("26");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("27");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("28");
|
||||
verify.currentLineContentIs("class b extends a {");
|
||||
goTo.marker("29");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("30");
|
||||
verify.currentLineContentIs("class m1b {");
|
||||
goTo.marker("31");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("32");
|
||||
verify.currentLineContentIs("interface m1ib {");
|
||||
goTo.marker("33");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("34");
|
||||
verify.currentLineContentIs("class c extends m1b {");
|
||||
goTo.marker("35");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("36");
|
||||
verify.currentLineContentIs("class ib2 implements m1ib {");
|
||||
goTo.marker("37");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("38");
|
||||
verify.currentLineContentIs("declare class aAmbient {");
|
||||
goTo.marker("39");
|
||||
verify.currentLineContentIs(" constructor(n: number);");
|
||||
goTo.marker("40");
|
||||
verify.currentLineContentIs(" constructor(s: string);");
|
||||
goTo.marker("41");
|
||||
verify.currentLineContentIs(" public pgF(): void;");
|
||||
goTo.marker("42");
|
||||
verify.currentLineContentIs(" public pv;");
|
||||
goTo.marker("43");
|
||||
verify.currentLineContentIs(" public d: number;");
|
||||
goTo.marker("44");
|
||||
verify.currentLineContentIs(" static p2: { x: number; y: number; };");
|
||||
goTo.marker("45");
|
||||
verify.currentLineContentIs(" static d2();");
|
||||
goTo.marker("46");
|
||||
verify.currentLineContentIs(" static p3;");
|
||||
goTo.marker("47");
|
||||
verify.currentLineContentIs(" private pv3;");
|
||||
goTo.marker("48");
|
||||
verify.currentLineContentIs(" private foo(s);");
|
||||
goTo.marker("49");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("50");
|
||||
verify.currentLineContentIs("class d {");
|
||||
goTo.marker("51");
|
||||
verify.currentLineContentIs(" private foo(n: number): string;");
|
||||
goTo.marker("52");
|
||||
verify.currentLineContentIs(" private foo(s: string): string;");
|
||||
goTo.marker("53");
|
||||
verify.currentLineContentIs(" private foo(ns: any) {");
|
||||
goTo.marker("54");
|
||||
verify.currentLineContentIs(" return ns.toString();");
|
||||
goTo.marker("55");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("56");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("57");
|
||||
verify.currentLineContentIs("class e {");
|
||||
goTo.marker("58");
|
||||
verify.currentLineContentIs(" private foo(s: string): string;");
|
||||
goTo.marker("59");
|
||||
verify.currentLineContentIs(" private foo(n: number): string;");
|
||||
goTo.marker("60");
|
||||
verify.currentLineContentIs(" private foo(ns: any) {");
|
||||
goTo.marker("61");
|
||||
verify.currentLineContentIs(" return ns.toString();");
|
||||
goTo.marker("62");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("63");
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////*1*/ class a {
|
||||
/////*2*/ constructor ( n : number ) ;
|
||||
/////*3*/ constructor ( s : string ) ;
|
||||
/////*4*/ constructor ( ns : any ) {
|
||||
////
|
||||
/////*5*/ }
|
||||
////
|
||||
/////*6*/ public pgF ( ) { }
|
||||
////
|
||||
/////*7*/ public pv ;
|
||||
/////*8*/ public get d ( ) {
|
||||
/////*9*/ return 30 ;
|
||||
/////*10*/ }
|
||||
/////*11*/ public set d ( number ) {
|
||||
/////*12*/ }
|
||||
////
|
||||
/////*13*/ public static get p2 ( ) {
|
||||
/////*14*/ return { x : 30 , y : 40 } ;
|
||||
/////*15*/ }
|
||||
////
|
||||
/////*16*/ private static d2 ( ) {
|
||||
/////*17*/ }
|
||||
/////*18*/ private static get p3 ( ) {
|
||||
/////*19*/ return "string" ;
|
||||
/////*20*/ }
|
||||
/////*21*/ private pv3 ;
|
||||
////
|
||||
/////*22*/ private foo ( n : number ) : string ;
|
||||
/////*23*/ private foo ( s : string ) : string ;
|
||||
/////*24*/ private foo ( ns : any ) {
|
||||
/////*25*/ return ns.toString ( ) ;
|
||||
/////*26*/ }
|
||||
/////*27*/}
|
||||
////
|
||||
/////*28*/ class b extends a {
|
||||
/////*29*/}
|
||||
////
|
||||
/////*30*/ class m1b {
|
||||
////
|
||||
/////*31*/}
|
||||
////
|
||||
/////*32*/ interface m1ib {
|
||||
////
|
||||
/////*33*/ }
|
||||
/////*34*/ class c extends m1b {
|
||||
/////*35*/}
|
||||
////
|
||||
/////*36*/ class ib2 implements m1ib {
|
||||
/////*37*/}
|
||||
////
|
||||
/////*38*/ declare class aAmbient {
|
||||
/////*39*/ constructor ( n : number ) ;
|
||||
/////*40*/ constructor ( s : string ) ;
|
||||
/////*41*/ public pgF ( ) : void ;
|
||||
/////*42*/ public pv ;
|
||||
/////*43*/ public d : number ;
|
||||
/////*44*/ static p2 : { x : number ; y : number ; } ;
|
||||
/////*45*/ static d2 ( ) ;
|
||||
/////*46*/ static p3 ;
|
||||
/////*47*/ private pv3 ;
|
||||
/////*48*/ private foo ( s ) ;
|
||||
/////*49*/}
|
||||
////
|
||||
/////*50*/ class d {
|
||||
/////*51*/ private foo ( n : number ) : string ;
|
||||
/////*52*/ private foo ( s : string ) : string ;
|
||||
/////*53*/ private foo ( ns : any ) {
|
||||
/////*54*/ return ns.toString ( ) ;
|
||||
/////*55*/ }
|
||||
/////*56*/}
|
||||
////
|
||||
/////*57*/ class e {
|
||||
/////*58*/ private foo ( s : string ) : string ;
|
||||
/////*59*/ private foo ( n : number ) : string ;
|
||||
/////*60*/ private foo ( ns : any ) {
|
||||
/////*61*/ return ns.toString ( ) ;
|
||||
/////*62*/ }
|
||||
/////*63*/}
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("class a {");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs(" constructor(n: number);");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs(" constructor(s: string);");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs(" constructor(ns: any) {");
|
||||
goTo.marker("5");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("6");
|
||||
verify.currentLineContentIs(" public pgF() { }");
|
||||
goTo.marker("7");
|
||||
verify.currentLineContentIs(" public pv;");
|
||||
goTo.marker("8");
|
||||
verify.currentLineContentIs(" public get d() {");
|
||||
goTo.marker("9");
|
||||
verify.currentLineContentIs(" return 30;");
|
||||
goTo.marker("10");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("11");
|
||||
verify.currentLineContentIs(" public set d(number) {");
|
||||
goTo.marker("12");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("13");
|
||||
verify.currentLineContentIs(" public static get p2() {");
|
||||
goTo.marker("14");
|
||||
verify.currentLineContentIs(" return { x: 30, y: 40 };");
|
||||
goTo.marker("15");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("16");
|
||||
verify.currentLineContentIs(" private static d2() {");
|
||||
goTo.marker("17");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("18");
|
||||
verify.currentLineContentIs(" private static get p3() {");
|
||||
goTo.marker("19");
|
||||
verify.currentLineContentIs(' return "string";');
|
||||
goTo.marker("20");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("21");
|
||||
verify.currentLineContentIs(" private pv3;");
|
||||
goTo.marker("22");
|
||||
verify.currentLineContentIs(" private foo(n: number): string;");
|
||||
goTo.marker("23");
|
||||
verify.currentLineContentIs(" private foo(s: string): string;");
|
||||
goTo.marker("24");
|
||||
verify.currentLineContentIs(" private foo(ns: any) {");
|
||||
goTo.marker("25");
|
||||
verify.currentLineContentIs(" return ns.toString();");
|
||||
goTo.marker("26");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("27");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("28");
|
||||
verify.currentLineContentIs("class b extends a {");
|
||||
goTo.marker("29");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("30");
|
||||
verify.currentLineContentIs("class m1b {");
|
||||
goTo.marker("31");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("32");
|
||||
verify.currentLineContentIs("interface m1ib {");
|
||||
goTo.marker("33");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("34");
|
||||
verify.currentLineContentIs("class c extends m1b {");
|
||||
goTo.marker("35");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("36");
|
||||
verify.currentLineContentIs("class ib2 implements m1ib {");
|
||||
goTo.marker("37");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("38");
|
||||
verify.currentLineContentIs("declare class aAmbient {");
|
||||
goTo.marker("39");
|
||||
verify.currentLineContentIs(" constructor(n: number);");
|
||||
goTo.marker("40");
|
||||
verify.currentLineContentIs(" constructor(s: string);");
|
||||
goTo.marker("41");
|
||||
verify.currentLineContentIs(" public pgF(): void;");
|
||||
goTo.marker("42");
|
||||
verify.currentLineContentIs(" public pv;");
|
||||
goTo.marker("43");
|
||||
verify.currentLineContentIs(" public d: number;");
|
||||
goTo.marker("44");
|
||||
verify.currentLineContentIs(" static p2: { x: number; y: number; };");
|
||||
goTo.marker("45");
|
||||
verify.currentLineContentIs(" static d2();");
|
||||
goTo.marker("46");
|
||||
verify.currentLineContentIs(" static p3;");
|
||||
goTo.marker("47");
|
||||
verify.currentLineContentIs(" private pv3;");
|
||||
goTo.marker("48");
|
||||
verify.currentLineContentIs(" private foo(s);");
|
||||
goTo.marker("49");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("50");
|
||||
verify.currentLineContentIs("class d {");
|
||||
goTo.marker("51");
|
||||
verify.currentLineContentIs(" private foo(n: number): string;");
|
||||
goTo.marker("52");
|
||||
verify.currentLineContentIs(" private foo(s: string): string;");
|
||||
goTo.marker("53");
|
||||
verify.currentLineContentIs(" private foo(ns: any) {");
|
||||
goTo.marker("54");
|
||||
verify.currentLineContentIs(" return ns.toString();");
|
||||
goTo.marker("55");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("56");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("57");
|
||||
verify.currentLineContentIs("class e {");
|
||||
goTo.marker("58");
|
||||
verify.currentLineContentIs(" private foo(s: string): string;");
|
||||
goTo.marker("59");
|
||||
verify.currentLineContentIs(" private foo(n: number): string;");
|
||||
goTo.marker("60");
|
||||
verify.currentLineContentIs(" private foo(ns: any) {");
|
||||
goTo.marker("61");
|
||||
verify.currentLineContentIs(" return ns.toString();");
|
||||
goTo.marker("62");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("63");
|
||||
verify.currentLineContentIs("}");
|
||||
@ -1,91 +1,91 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////function f( ) {/*1*/
|
||||
////var x = 3;/*2*/
|
||||
//// var z = 2 ;/*3*/
|
||||
//// a = z ++ - 2 * x ;/*4*/
|
||||
//// for ( ; ; ) {/*5*/
|
||||
//// a+=(g +g)*a%t;/*6*/
|
||||
//// b -- ;/*7*/
|
||||
////}/*8*/
|
||||
////
|
||||
//// switch ( a )/*9*/
|
||||
//// {
|
||||
//// case 1 : {/*10*/
|
||||
//// a ++ ;/*11*/
|
||||
//// b--;/*12*/
|
||||
//// if(a===a)/*13*/
|
||||
//// return;/*14*/
|
||||
//// else/*15*/
|
||||
//// {
|
||||
//// for(a in b)/*16*/
|
||||
//// if(a!=a)/*17*/
|
||||
//// {
|
||||
//// for(a in b)/*18*/
|
||||
//// {
|
||||
////a++;/*19*/
|
||||
//// }/*20*/
|
||||
//// }/*21*/
|
||||
//// }/*22*/
|
||||
//// }/*23*/
|
||||
//// default:/*24*/
|
||||
//// break;/*25*/
|
||||
//// }/*26*/
|
||||
////}/*27*/
|
||||
|
||||
format.setOption("InsertSpaceAfterSemicolonInForStatements", true);
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("function f() {");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs(" var x = 3;");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs(" var z = 2;");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs(" a = z++ - 2 * x;");
|
||||
goTo.marker("5");
|
||||
verify.currentLineContentIs(" for (; ;) {");
|
||||
goTo.marker("6");
|
||||
verify.currentLineContentIs(" a += (g + g) * a % t;");
|
||||
goTo.marker("7");
|
||||
verify.currentLineContentIs(" b--;");
|
||||
goTo.marker("8");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("9");
|
||||
verify.currentLineContentIs(" switch (a) {");
|
||||
goTo.marker("10");
|
||||
verify.currentLineContentIs(" case 1: {");
|
||||
goTo.marker("11");
|
||||
verify.currentLineContentIs(" a++;");
|
||||
goTo.marker("12");
|
||||
verify.currentLineContentIs(" b--;");
|
||||
goTo.marker("13");
|
||||
verify.currentLineContentIs(" if (a === a)");
|
||||
goTo.marker("14");
|
||||
verify.currentLineContentIs(" return;");
|
||||
goTo.marker("15");
|
||||
verify.currentLineContentIs(" else {");
|
||||
goTo.marker("16");
|
||||
verify.currentLineContentIs(" for (a in b)");
|
||||
goTo.marker("17");
|
||||
verify.currentLineContentIs(" if (a != a) {");
|
||||
goTo.marker("18");
|
||||
verify.currentLineContentIs(" for (a in b) {");
|
||||
goTo.marker("19");
|
||||
verify.currentLineContentIs(" a++;");
|
||||
goTo.marker("20");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("21");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("22");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("23");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("24");
|
||||
verify.currentLineContentIs(" default:");
|
||||
goTo.marker("25");
|
||||
verify.currentLineContentIs(" break;");
|
||||
goTo.marker("26");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("27");
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////function f( ) {/*1*/
|
||||
////var x = 3;/*2*/
|
||||
//// var z = 2 ;/*3*/
|
||||
//// a = z ++ - 2 * x ;/*4*/
|
||||
//// for ( ; ; ) {/*5*/
|
||||
//// a+=(g +g)*a%t;/*6*/
|
||||
//// b -- ;/*7*/
|
||||
////}/*8*/
|
||||
////
|
||||
//// switch ( a )/*9*/
|
||||
//// {
|
||||
//// case 1 : {/*10*/
|
||||
//// a ++ ;/*11*/
|
||||
//// b--;/*12*/
|
||||
//// if(a===a)/*13*/
|
||||
//// return;/*14*/
|
||||
//// else/*15*/
|
||||
//// {
|
||||
//// for(a in b)/*16*/
|
||||
//// if(a!=a)/*17*/
|
||||
//// {
|
||||
//// for(a in b)/*18*/
|
||||
//// {
|
||||
////a++;/*19*/
|
||||
//// }/*20*/
|
||||
//// }/*21*/
|
||||
//// }/*22*/
|
||||
//// }/*23*/
|
||||
//// default:/*24*/
|
||||
//// break;/*25*/
|
||||
//// }/*26*/
|
||||
////}/*27*/
|
||||
|
||||
format.setOption("InsertSpaceAfterSemicolonInForStatements", true);
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("function f() {");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs(" var x = 3;");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs(" var z = 2;");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs(" a = z++ - 2 * x;");
|
||||
goTo.marker("5");
|
||||
verify.currentLineContentIs(" for (; ;) {");
|
||||
goTo.marker("6");
|
||||
verify.currentLineContentIs(" a += (g + g) * a % t;");
|
||||
goTo.marker("7");
|
||||
verify.currentLineContentIs(" b--;");
|
||||
goTo.marker("8");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("9");
|
||||
verify.currentLineContentIs(" switch (a) {");
|
||||
goTo.marker("10");
|
||||
verify.currentLineContentIs(" case 1: {");
|
||||
goTo.marker("11");
|
||||
verify.currentLineContentIs(" a++;");
|
||||
goTo.marker("12");
|
||||
verify.currentLineContentIs(" b--;");
|
||||
goTo.marker("13");
|
||||
verify.currentLineContentIs(" if (a === a)");
|
||||
goTo.marker("14");
|
||||
verify.currentLineContentIs(" return;");
|
||||
goTo.marker("15");
|
||||
verify.currentLineContentIs(" else {");
|
||||
goTo.marker("16");
|
||||
verify.currentLineContentIs(" for (a in b)");
|
||||
goTo.marker("17");
|
||||
verify.currentLineContentIs(" if (a != a) {");
|
||||
goTo.marker("18");
|
||||
verify.currentLineContentIs(" for (a in b) {");
|
||||
goTo.marker("19");
|
||||
verify.currentLineContentIs(" a++;");
|
||||
goTo.marker("20");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("21");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("22");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("23");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("24");
|
||||
verify.currentLineContentIs(" default:");
|
||||
goTo.marker("25");
|
||||
verify.currentLineContentIs(" break;");
|
||||
goTo.marker("26");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("27");
|
||||
verify.currentLineContentIs("}");
|
||||
@ -1,13 +1,13 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////var v1 = ((1, 2, 3), 4, 5, (6, 7));/*1*/
|
||||
////function f1() {
|
||||
//// var a = 1;
|
||||
//// return a, v1, a;/*2*/
|
||||
////}
|
||||
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("var v1 = ((1, 2, 3), 4, 5, (6, 7));");
|
||||
goTo.marker("2");
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////var v1 = ((1, 2, 3), 4, 5, (6, 7));/*1*/
|
||||
////function f1() {
|
||||
//// var a = 1;
|
||||
//// return a, v1, a;/*2*/
|
||||
////}
|
||||
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("var v1 = ((1, 2, 3), 4, 5, (6, 7));");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs(" return a, v1, a;");
|
||||
@ -1,19 +1,19 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////*2*/do {
|
||||
/////*3*/ for (var i = 0; i < 10; i++)
|
||||
/////*4*/ i -= 2
|
||||
/////*5*/ }/*1*/while (1 !== 1)
|
||||
goTo.marker("1");
|
||||
edit.insert("\r\n");
|
||||
verify.currentLineContentIs("while (1 !== 1)");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs("do {");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs(" for (var i = 0; i < 10; i++)");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs(" i -= 2");
|
||||
goTo.marker("5");
|
||||
//bug 718362 expected result : "}" , actual result : " }"
|
||||
//verify.currentLineContentIs("}");
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////*2*/do {
|
||||
/////*3*/ for (var i = 0; i < 10; i++)
|
||||
/////*4*/ i -= 2
|
||||
/////*5*/ }/*1*/while (1 !== 1)
|
||||
goTo.marker("1");
|
||||
edit.insert("\r\n");
|
||||
verify.currentLineContentIs("while (1 !== 1)");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs("do {");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs(" for (var i = 0; i < 10; i++)");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs(" i -= 2");
|
||||
goTo.marker("5");
|
||||
//bug 718362 expected result : "}" , actual result : " }"
|
||||
//verify.currentLineContentIs("}");
|
||||
verify.currentLineContentIs("}");
|
||||
@ -1,12 +1,12 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////*1*/$ ( document ) . ready ( function ( ) {
|
||||
/////*2*/ alert ( 'i am ready' ) ;
|
||||
/////*3*/ } );
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("$(document).ready(function() {");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs(" alert('i am ready');");
|
||||
goTo.marker("3");
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////*1*/$ ( document ) . ready ( function ( ) {
|
||||
/////*2*/ alert ( 'i am ready' ) ;
|
||||
/////*3*/ } );
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("$(document).ready(function() {");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs(" alert('i am ready');");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs("});");
|
||||
@ -1,25 +1,25 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////*1*/ function foo ( x : { } ) { }
|
||||
////
|
||||
/////*2*/foo ( { } ) ;
|
||||
////
|
||||
////
|
||||
////
|
||||
/////*3*/ interface bar {
|
||||
/////*4*/ x : { } ;
|
||||
/////*5*/ y : ( ) => { } ;
|
||||
/////*6*/ }
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("function foo(x: {}) { }");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs("foo({});");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs("interface bar {");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs(" x: {};");
|
||||
goTo.marker("5");
|
||||
verify.currentLineContentIs(" y: () => {};");
|
||||
goTo.marker("6");
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////*1*/ function foo ( x : { } ) { }
|
||||
////
|
||||
/////*2*/foo ( { } ) ;
|
||||
////
|
||||
////
|
||||
////
|
||||
/////*3*/ interface bar {
|
||||
/////*4*/ x : { } ;
|
||||
/////*5*/ y : ( ) => { } ;
|
||||
/////*6*/ }
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("function foo(x: {}) { }");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs("foo({});");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs("interface bar {");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs(" x: {};");
|
||||
goTo.marker("5");
|
||||
verify.currentLineContentIs(" y: () => {};");
|
||||
goTo.marker("6");
|
||||
verify.currentLineContentIs("}");
|
||||
@ -1,273 +1,273 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////*1*/var a;var c , b;var $d
|
||||
/////*2*/var $e
|
||||
/////*3*/var f
|
||||
/////*4*/a++;b++;
|
||||
////
|
||||
/////*5*/function f ( ) {
|
||||
/////*6*/ for (i = 0; i < 10; i++) {
|
||||
/////*7*/ k = abc + 123 ^ d;
|
||||
/////*8*/ a = XYZ[m (a[b[c][d]])];
|
||||
/////*9*/ break;
|
||||
////
|
||||
/////*10*/ switch ( variable){
|
||||
/////*11*/ case 1: abc += 425;
|
||||
/////*12*/break;
|
||||
/////*13*/case 404 : a [x--/2]%=3 ;
|
||||
/////*14*/ break ;
|
||||
/////*15*/ case vari : v[--x ] *=++y*( m + n / k[z]);
|
||||
/////*16*/ for (a in b){
|
||||
/////*17*/ for (a = 0; a < 10; ++a) {
|
||||
/////*18*/ a++;--a;
|
||||
/////*19*/ if (a == b) {
|
||||
/////*20*/ a++;b--;
|
||||
/////*21*/ }
|
||||
/////*22*/else
|
||||
/////*23*/if (a == c){
|
||||
/////*24*/++a;
|
||||
/////*25*/(--c)+=d;
|
||||
/////*26*/$c = $a + --$b;
|
||||
/////*27*/}
|
||||
/////*28*/if (a == b)
|
||||
/////*29*/if (a != b) {
|
||||
/////*30*/ if (a !== b)
|
||||
/////*31*/ if (a === b)
|
||||
/////*32*/ --a;
|
||||
/////*33*/ else
|
||||
/////*34*/ --a;
|
||||
/////*35*/ else {
|
||||
/////*36*/ a--;++b;
|
||||
/////*37*/a++
|
||||
/////*38*/ }
|
||||
/////*39*/ }
|
||||
/////*40*/ }
|
||||
/////*41*/ for (x in y) {
|
||||
/////*42*/m-=m;
|
||||
/////*43*/k=1+2+3+4;
|
||||
/////*44*/}
|
||||
/////*45*/}
|
||||
/////*46*/ break;
|
||||
////
|
||||
/////*47*/ }
|
||||
/////*48*/ }
|
||||
/////*49*/ var a ={b:function(){}};
|
||||
/////*50*/ return {a:1,b:2}
|
||||
/////*51*/}
|
||||
////
|
||||
/////*52*/var z = 1;
|
||||
/////*53*/ for (i = 0; i < 10; i++)
|
||||
/////*54*/ for (j = 0; j < 10; j++)
|
||||
/////*55*/for (k = 0; k < 10; ++k) {
|
||||
/////*56*/z++;
|
||||
/////*57*/}
|
||||
////
|
||||
/////*58*/for (k = 0; k < 10; k += 2) {
|
||||
/////*59*/z++;
|
||||
/////*60*/}
|
||||
////
|
||||
/////*61*/ $(document).ready ();
|
||||
////
|
||||
////
|
||||
/////*62*/ function pageLoad() {
|
||||
/////*63*/ $('#TextBox1' ) . unbind ( ) ;
|
||||
/////*64*/$('#TextBox1' ) . datepicker ( ) ;
|
||||
/////*65*/}
|
||||
////
|
||||
/////*66*/ function pageLoad ( ) {
|
||||
/////*67*/ var webclass=[
|
||||
/////*68*/ { 'student' :/*69*/
|
||||
/////*70*/ { 'id': '1', 'name': 'Linda Jones', 'legacySkill': 'Access, VB 5.0' }
|
||||
/////*71*/ } ,
|
||||
/////*72*/{ 'student':/*73*/
|
||||
/////*74*/{'id':'2','name':'Adam Davidson','legacySkill':'Cobol,MainFrame'}
|
||||
/////*75*/} ,
|
||||
/////*76*/ { 'student':/*77*/
|
||||
/////*78*/{ 'id':'3','name':'Charles Boyer' ,'legacySkill':'HTML, XML'}
|
||||
/////*79*/}
|
||||
/////*80*/ ];
|
||||
////
|
||||
/////*81*/$create(Sys.UI.DataView,{data:webclass},null,null,$get('SList'));
|
||||
////
|
||||
/////*82*/}
|
||||
////
|
||||
/////*83*/$( document ).ready(function(){
|
||||
/////*84*/alert('hello');
|
||||
/////*85*/ } ) ;
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("var a; var c, b; var $d");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs("var $e");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs("var f");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs("a++; b++;");
|
||||
goTo.marker("5");
|
||||
verify.currentLineContentIs("function f() {");
|
||||
goTo.marker("6");
|
||||
verify.currentLineContentIs(" for (i = 0; i < 10; i++) {");
|
||||
goTo.marker("7");
|
||||
verify.currentLineContentIs(" k = abc + 123 ^ d;");
|
||||
goTo.marker("8");
|
||||
verify.currentLineContentIs(" a = XYZ[m(a[b[c][d]])];");
|
||||
goTo.marker("9");
|
||||
verify.currentLineContentIs(" break;");
|
||||
goTo.marker("10");
|
||||
verify.currentLineContentIs(" switch (variable) {");
|
||||
goTo.marker("11");
|
||||
verify.currentLineContentIs(" case 1: abc += 425;");
|
||||
goTo.marker("12");
|
||||
verify.currentLineContentIs(" break;");
|
||||
goTo.marker("13");
|
||||
verify.currentLineContentIs(" case 404: a[x-- / 2] %= 3;");
|
||||
goTo.marker("14");
|
||||
verify.currentLineContentIs(" break;");
|
||||
goTo.marker("15");
|
||||
verify.currentLineContentIs(" case vari: v[--x] *= ++y * (m + n / k[z]);");
|
||||
goTo.marker("16");
|
||||
verify.currentLineContentIs(" for (a in b) {");
|
||||
goTo.marker("17");
|
||||
verify.currentLineContentIs(" for (a = 0; a < 10; ++a) {");
|
||||
goTo.marker("18");
|
||||
verify.currentLineContentIs(" a++; --a;");
|
||||
goTo.marker("19");
|
||||
verify.currentLineContentIs(" if (a == b) {");
|
||||
goTo.marker("20");
|
||||
verify.currentLineContentIs(" a++; b--;");
|
||||
goTo.marker("21");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("22");
|
||||
verify.currentLineContentIs(" else");
|
||||
goTo.marker("23");
|
||||
verify.currentLineContentIs(" if (a == c) {");
|
||||
goTo.marker("24");
|
||||
verify.currentLineContentIs(" ++a;");
|
||||
goTo.marker("25");
|
||||
verify.currentLineContentIs(" (--c) += d;");
|
||||
goTo.marker("26");
|
||||
verify.currentLineContentIs(" $c = $a + --$b;");
|
||||
goTo.marker("27");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("28");
|
||||
verify.currentLineContentIs(" if (a == b)");
|
||||
goTo.marker("29");
|
||||
verify.currentLineContentIs(" if (a != b) {");
|
||||
goTo.marker("30");
|
||||
verify.currentLineContentIs(" if (a !== b)");
|
||||
goTo.marker("31");
|
||||
verify.currentLineContentIs(" if (a === b)");
|
||||
goTo.marker("32");
|
||||
verify.currentLineContentIs(" --a;");
|
||||
goTo.marker("33");
|
||||
verify.currentLineContentIs(" else");
|
||||
goTo.marker("34");
|
||||
verify.currentLineContentIs(" --a;");
|
||||
goTo.marker("35");
|
||||
verify.currentLineContentIs(" else {");
|
||||
goTo.marker("36");
|
||||
verify.currentLineContentIs(" a--; ++b;");
|
||||
goTo.marker("37");
|
||||
verify.currentLineContentIs(" a++");
|
||||
goTo.marker("38");
|
||||
//bug 697788 expect result : " }", actual result : " }"
|
||||
//verify.currentLineContentIs(" }");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("39");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("40");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("41");
|
||||
verify.currentLineContentIs(" for (x in y) {");
|
||||
goTo.marker("42");
|
||||
verify.currentLineContentIs(" m -= m;");
|
||||
goTo.marker("43");
|
||||
verify.currentLineContentIs(" k = 1 + 2 + 3 + 4;");
|
||||
goTo.marker("44");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("45");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("46");
|
||||
verify.currentLineContentIs(" break;");
|
||||
goTo.marker("47");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("48");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("49");
|
||||
//bug 704204 expect result : " var a = { b: function () { } };", actual result : " var a = { b: function() { } };"
|
||||
//verify.currentLineContentIs(" var a = { b: function () { } };");
|
||||
verify.currentLineContentIs(" var a = { b: function() { } };");
|
||||
goTo.marker("50");
|
||||
verify.currentLineContentIs(" return { a: 1, b: 2 }");
|
||||
goTo.marker("51");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("52");
|
||||
verify.currentLineContentIs("var z = 1;");
|
||||
goTo.marker("53");
|
||||
verify.currentLineContentIs("for (i = 0; i < 10; i++)");
|
||||
goTo.marker("54");
|
||||
verify.currentLineContentIs(" for (j = 0; j < 10; j++)");
|
||||
goTo.marker("55");
|
||||
verify.currentLineContentIs(" for (k = 0; k < 10; ++k) {");
|
||||
goTo.marker("56");
|
||||
verify.currentLineContentIs(" z++;");
|
||||
goTo.marker("57");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("58");
|
||||
verify.currentLineContentIs("for (k = 0; k < 10; k += 2) {");
|
||||
goTo.marker("59");
|
||||
verify.currentLineContentIs(" z++;");
|
||||
goTo.marker("60");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("61");
|
||||
verify.currentLineContentIs("$(document).ready();");
|
||||
goTo.marker("62");
|
||||
verify.currentLineContentIs("function pageLoad() {");
|
||||
goTo.marker("63");
|
||||
verify.currentLineContentIs(" $('#TextBox1').unbind();");
|
||||
goTo.marker("64");
|
||||
verify.currentLineContentIs(" $('#TextBox1').datepicker();");
|
||||
goTo.marker("65");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("66");
|
||||
verify.currentLineContentIs("function pageLoad() {");
|
||||
goTo.marker("67");
|
||||
verify.currentLineContentIs(" var webclass = [");
|
||||
goTo.marker("68");
|
||||
verify.currentLineContentIs(" {");
|
||||
goTo.marker("69");
|
||||
verify.currentLineContentIs(" 'student':");
|
||||
goTo.marker("70");
|
||||
verify.currentLineContentIs(" { 'id': '1', 'name': 'Linda Jones', 'legacySkill': 'Access, VB 5.0' }");
|
||||
goTo.marker("71");
|
||||
verify.currentLineContentIs(" },");
|
||||
goTo.marker("72");
|
||||
verify.currentLineContentIs(" {");
|
||||
goTo.marker("73");
|
||||
verify.currentLineContentIs(" 'student':");
|
||||
goTo.marker("74");
|
||||
verify.currentLineContentIs(" { 'id': '2', 'name': 'Adam Davidson', 'legacySkill': 'Cobol,MainFrame' }");
|
||||
goTo.marker("75");
|
||||
verify.currentLineContentIs(" },");
|
||||
goTo.marker("76");
|
||||
verify.currentLineContentIs(" {");
|
||||
goTo.marker("77");
|
||||
verify.currentLineContentIs(" 'student':");
|
||||
goTo.marker("78");
|
||||
verify.currentLineContentIs(" { 'id': '3', 'name': 'Charles Boyer', 'legacySkill': 'HTML, XML' }");
|
||||
goTo.marker("79");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("80");
|
||||
verify.currentLineContentIs(" ];");
|
||||
goTo.marker("81");
|
||||
verify.currentLineContentIs(" $create(Sys.UI.DataView, { data: webclass }, null, null, $get('SList'));");
|
||||
goTo.marker("82");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("83");
|
||||
//bug 704204 expect result : "$(document).ready(function () {", actual result : "$(document).ready(function() "
|
||||
//verify.currentLineContentIs("$(document).ready(function () {");
|
||||
verify.currentLineContentIs("$(document).ready(function() {");
|
||||
goTo.marker("84");
|
||||
verify.currentLineContentIs(" alert('hello');");
|
||||
goTo.marker("85");
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////*1*/var a;var c , b;var $d
|
||||
/////*2*/var $e
|
||||
/////*3*/var f
|
||||
/////*4*/a++;b++;
|
||||
////
|
||||
/////*5*/function f ( ) {
|
||||
/////*6*/ for (i = 0; i < 10; i++) {
|
||||
/////*7*/ k = abc + 123 ^ d;
|
||||
/////*8*/ a = XYZ[m (a[b[c][d]])];
|
||||
/////*9*/ break;
|
||||
////
|
||||
/////*10*/ switch ( variable){
|
||||
/////*11*/ case 1: abc += 425;
|
||||
/////*12*/break;
|
||||
/////*13*/case 404 : a [x--/2]%=3 ;
|
||||
/////*14*/ break ;
|
||||
/////*15*/ case vari : v[--x ] *=++y*( m + n / k[z]);
|
||||
/////*16*/ for (a in b){
|
||||
/////*17*/ for (a = 0; a < 10; ++a) {
|
||||
/////*18*/ a++;--a;
|
||||
/////*19*/ if (a == b) {
|
||||
/////*20*/ a++;b--;
|
||||
/////*21*/ }
|
||||
/////*22*/else
|
||||
/////*23*/if (a == c){
|
||||
/////*24*/++a;
|
||||
/////*25*/(--c)+=d;
|
||||
/////*26*/$c = $a + --$b;
|
||||
/////*27*/}
|
||||
/////*28*/if (a == b)
|
||||
/////*29*/if (a != b) {
|
||||
/////*30*/ if (a !== b)
|
||||
/////*31*/ if (a === b)
|
||||
/////*32*/ --a;
|
||||
/////*33*/ else
|
||||
/////*34*/ --a;
|
||||
/////*35*/ else {
|
||||
/////*36*/ a--;++b;
|
||||
/////*37*/a++
|
||||
/////*38*/ }
|
||||
/////*39*/ }
|
||||
/////*40*/ }
|
||||
/////*41*/ for (x in y) {
|
||||
/////*42*/m-=m;
|
||||
/////*43*/k=1+2+3+4;
|
||||
/////*44*/}
|
||||
/////*45*/}
|
||||
/////*46*/ break;
|
||||
////
|
||||
/////*47*/ }
|
||||
/////*48*/ }
|
||||
/////*49*/ var a ={b:function(){}};
|
||||
/////*50*/ return {a:1,b:2}
|
||||
/////*51*/}
|
||||
////
|
||||
/////*52*/var z = 1;
|
||||
/////*53*/ for (i = 0; i < 10; i++)
|
||||
/////*54*/ for (j = 0; j < 10; j++)
|
||||
/////*55*/for (k = 0; k < 10; ++k) {
|
||||
/////*56*/z++;
|
||||
/////*57*/}
|
||||
////
|
||||
/////*58*/for (k = 0; k < 10; k += 2) {
|
||||
/////*59*/z++;
|
||||
/////*60*/}
|
||||
////
|
||||
/////*61*/ $(document).ready ();
|
||||
////
|
||||
////
|
||||
/////*62*/ function pageLoad() {
|
||||
/////*63*/ $('#TextBox1' ) . unbind ( ) ;
|
||||
/////*64*/$('#TextBox1' ) . datepicker ( ) ;
|
||||
/////*65*/}
|
||||
////
|
||||
/////*66*/ function pageLoad ( ) {
|
||||
/////*67*/ var webclass=[
|
||||
/////*68*/ { 'student' :/*69*/
|
||||
/////*70*/ { 'id': '1', 'name': 'Linda Jones', 'legacySkill': 'Access, VB 5.0' }
|
||||
/////*71*/ } ,
|
||||
/////*72*/{ 'student':/*73*/
|
||||
/////*74*/{'id':'2','name':'Adam Davidson','legacySkill':'Cobol,MainFrame'}
|
||||
/////*75*/} ,
|
||||
/////*76*/ { 'student':/*77*/
|
||||
/////*78*/{ 'id':'3','name':'Charles Boyer' ,'legacySkill':'HTML, XML'}
|
||||
/////*79*/}
|
||||
/////*80*/ ];
|
||||
////
|
||||
/////*81*/$create(Sys.UI.DataView,{data:webclass},null,null,$get('SList'));
|
||||
////
|
||||
/////*82*/}
|
||||
////
|
||||
/////*83*/$( document ).ready(function(){
|
||||
/////*84*/alert('hello');
|
||||
/////*85*/ } ) ;
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("var a; var c, b; var $d");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs("var $e");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs("var f");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs("a++; b++;");
|
||||
goTo.marker("5");
|
||||
verify.currentLineContentIs("function f() {");
|
||||
goTo.marker("6");
|
||||
verify.currentLineContentIs(" for (i = 0; i < 10; i++) {");
|
||||
goTo.marker("7");
|
||||
verify.currentLineContentIs(" k = abc + 123 ^ d;");
|
||||
goTo.marker("8");
|
||||
verify.currentLineContentIs(" a = XYZ[m(a[b[c][d]])];");
|
||||
goTo.marker("9");
|
||||
verify.currentLineContentIs(" break;");
|
||||
goTo.marker("10");
|
||||
verify.currentLineContentIs(" switch (variable) {");
|
||||
goTo.marker("11");
|
||||
verify.currentLineContentIs(" case 1: abc += 425;");
|
||||
goTo.marker("12");
|
||||
verify.currentLineContentIs(" break;");
|
||||
goTo.marker("13");
|
||||
verify.currentLineContentIs(" case 404: a[x-- / 2] %= 3;");
|
||||
goTo.marker("14");
|
||||
verify.currentLineContentIs(" break;");
|
||||
goTo.marker("15");
|
||||
verify.currentLineContentIs(" case vari: v[--x] *= ++y * (m + n / k[z]);");
|
||||
goTo.marker("16");
|
||||
verify.currentLineContentIs(" for (a in b) {");
|
||||
goTo.marker("17");
|
||||
verify.currentLineContentIs(" for (a = 0; a < 10; ++a) {");
|
||||
goTo.marker("18");
|
||||
verify.currentLineContentIs(" a++; --a;");
|
||||
goTo.marker("19");
|
||||
verify.currentLineContentIs(" if (a == b) {");
|
||||
goTo.marker("20");
|
||||
verify.currentLineContentIs(" a++; b--;");
|
||||
goTo.marker("21");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("22");
|
||||
verify.currentLineContentIs(" else");
|
||||
goTo.marker("23");
|
||||
verify.currentLineContentIs(" if (a == c) {");
|
||||
goTo.marker("24");
|
||||
verify.currentLineContentIs(" ++a;");
|
||||
goTo.marker("25");
|
||||
verify.currentLineContentIs(" (--c) += d;");
|
||||
goTo.marker("26");
|
||||
verify.currentLineContentIs(" $c = $a + --$b;");
|
||||
goTo.marker("27");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("28");
|
||||
verify.currentLineContentIs(" if (a == b)");
|
||||
goTo.marker("29");
|
||||
verify.currentLineContentIs(" if (a != b) {");
|
||||
goTo.marker("30");
|
||||
verify.currentLineContentIs(" if (a !== b)");
|
||||
goTo.marker("31");
|
||||
verify.currentLineContentIs(" if (a === b)");
|
||||
goTo.marker("32");
|
||||
verify.currentLineContentIs(" --a;");
|
||||
goTo.marker("33");
|
||||
verify.currentLineContentIs(" else");
|
||||
goTo.marker("34");
|
||||
verify.currentLineContentIs(" --a;");
|
||||
goTo.marker("35");
|
||||
verify.currentLineContentIs(" else {");
|
||||
goTo.marker("36");
|
||||
verify.currentLineContentIs(" a--; ++b;");
|
||||
goTo.marker("37");
|
||||
verify.currentLineContentIs(" a++");
|
||||
goTo.marker("38");
|
||||
//bug 697788 expect result : " }", actual result : " }"
|
||||
//verify.currentLineContentIs(" }");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("39");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("40");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("41");
|
||||
verify.currentLineContentIs(" for (x in y) {");
|
||||
goTo.marker("42");
|
||||
verify.currentLineContentIs(" m -= m;");
|
||||
goTo.marker("43");
|
||||
verify.currentLineContentIs(" k = 1 + 2 + 3 + 4;");
|
||||
goTo.marker("44");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("45");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("46");
|
||||
verify.currentLineContentIs(" break;");
|
||||
goTo.marker("47");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("48");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("49");
|
||||
//bug 704204 expect result : " var a = { b: function () { } };", actual result : " var a = { b: function() { } };"
|
||||
//verify.currentLineContentIs(" var a = { b: function () { } };");
|
||||
verify.currentLineContentIs(" var a = { b: function() { } };");
|
||||
goTo.marker("50");
|
||||
verify.currentLineContentIs(" return { a: 1, b: 2 }");
|
||||
goTo.marker("51");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("52");
|
||||
verify.currentLineContentIs("var z = 1;");
|
||||
goTo.marker("53");
|
||||
verify.currentLineContentIs("for (i = 0; i < 10; i++)");
|
||||
goTo.marker("54");
|
||||
verify.currentLineContentIs(" for (j = 0; j < 10; j++)");
|
||||
goTo.marker("55");
|
||||
verify.currentLineContentIs(" for (k = 0; k < 10; ++k) {");
|
||||
goTo.marker("56");
|
||||
verify.currentLineContentIs(" z++;");
|
||||
goTo.marker("57");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("58");
|
||||
verify.currentLineContentIs("for (k = 0; k < 10; k += 2) {");
|
||||
goTo.marker("59");
|
||||
verify.currentLineContentIs(" z++;");
|
||||
goTo.marker("60");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("61");
|
||||
verify.currentLineContentIs("$(document).ready();");
|
||||
goTo.marker("62");
|
||||
verify.currentLineContentIs("function pageLoad() {");
|
||||
goTo.marker("63");
|
||||
verify.currentLineContentIs(" $('#TextBox1').unbind();");
|
||||
goTo.marker("64");
|
||||
verify.currentLineContentIs(" $('#TextBox1').datepicker();");
|
||||
goTo.marker("65");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("66");
|
||||
verify.currentLineContentIs("function pageLoad() {");
|
||||
goTo.marker("67");
|
||||
verify.currentLineContentIs(" var webclass = [");
|
||||
goTo.marker("68");
|
||||
verify.currentLineContentIs(" {");
|
||||
goTo.marker("69");
|
||||
verify.currentLineContentIs(" 'student':");
|
||||
goTo.marker("70");
|
||||
verify.currentLineContentIs(" { 'id': '1', 'name': 'Linda Jones', 'legacySkill': 'Access, VB 5.0' }");
|
||||
goTo.marker("71");
|
||||
verify.currentLineContentIs(" },");
|
||||
goTo.marker("72");
|
||||
verify.currentLineContentIs(" {");
|
||||
goTo.marker("73");
|
||||
verify.currentLineContentIs(" 'student':");
|
||||
goTo.marker("74");
|
||||
verify.currentLineContentIs(" { 'id': '2', 'name': 'Adam Davidson', 'legacySkill': 'Cobol,MainFrame' }");
|
||||
goTo.marker("75");
|
||||
verify.currentLineContentIs(" },");
|
||||
goTo.marker("76");
|
||||
verify.currentLineContentIs(" {");
|
||||
goTo.marker("77");
|
||||
verify.currentLineContentIs(" 'student':");
|
||||
goTo.marker("78");
|
||||
verify.currentLineContentIs(" { 'id': '3', 'name': 'Charles Boyer', 'legacySkill': 'HTML, XML' }");
|
||||
goTo.marker("79");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("80");
|
||||
verify.currentLineContentIs(" ];");
|
||||
goTo.marker("81");
|
||||
verify.currentLineContentIs(" $create(Sys.UI.DataView, { data: webclass }, null, null, $get('SList'));");
|
||||
goTo.marker("82");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("83");
|
||||
//bug 704204 expect result : "$(document).ready(function () {", actual result : "$(document).ready(function() "
|
||||
//verify.currentLineContentIs("$(document).ready(function () {");
|
||||
verify.currentLineContentIs("$(document).ready(function() {");
|
||||
goTo.marker("84");
|
||||
verify.currentLineContentIs(" alert('hello');");
|
||||
goTo.marker("85");
|
||||
verify.currentLineContentIs("});");
|
||||
@ -1,13 +1,13 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
//// module Foo {
|
||||
//// export module A . B . C { }/**/
|
||||
//// }
|
||||
|
||||
format.document();
|
||||
goTo.bof();
|
||||
verify.currentLineContentIs("module Foo {");
|
||||
goTo.marker();
|
||||
verify.currentLineContentIs(" export module A.B.C { }");
|
||||
goTo.eof();
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
//// module Foo {
|
||||
//// export module A . B . C { }/**/
|
||||
//// }
|
||||
|
||||
format.document();
|
||||
goTo.bof();
|
||||
verify.currentLineContentIs("module Foo {");
|
||||
goTo.marker();
|
||||
verify.currentLineContentIs(" export module A.B.C { }");
|
||||
goTo.eof();
|
||||
verify.currentLineContentIs("}");
|
||||
@ -1,23 +1,23 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////*2*/do{
|
||||
/////*3*/do/*1*/{
|
||||
/////*4*/do{
|
||||
/////*5*/}while(a!==b)
|
||||
/////*6*/}while(a!==b)
|
||||
/////*7*/}while(a!==b)
|
||||
goTo.marker("1");
|
||||
edit.insert("\r\n");
|
||||
verify.currentLineContentIs(" {");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs("do{");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs(" do");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs("do{");
|
||||
goTo.marker("5");
|
||||
verify.currentLineContentIs("}while(a!==b)");
|
||||
goTo.marker("6");
|
||||
verify.currentLineContentIs("}while(a!==b)");
|
||||
goTo.marker("7");
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////*2*/do{
|
||||
/////*3*/do/*1*/{
|
||||
/////*4*/do{
|
||||
/////*5*/}while(a!==b)
|
||||
/////*6*/}while(a!==b)
|
||||
/////*7*/}while(a!==b)
|
||||
goTo.marker("1");
|
||||
edit.insert("\r\n");
|
||||
verify.currentLineContentIs(" {");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs("do{");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs(" do");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs("do{");
|
||||
goTo.marker("5");
|
||||
verify.currentLineContentIs("}while(a!==b)");
|
||||
goTo.marker("6");
|
||||
verify.currentLineContentIs("}while(a!==b)");
|
||||
goTo.marker("7");
|
||||
verify.currentLineContentIs("}while(a!==b)");
|
||||
@ -1,14 +1,14 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////{
|
||||
/////*1*/{
|
||||
/////*3*/test
|
||||
////}/*2*/
|
||||
////}
|
||||
format.selection("1", "2");
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs(" {");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs(" test");
|
||||
goTo.marker("2");
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////{
|
||||
/////*1*/{
|
||||
/////*3*/test
|
||||
////}/*2*/
|
||||
////}
|
||||
format.selection("1", "2");
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs(" {");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs(" test");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs(" }");
|
||||
@ -1,85 +1,85 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////var x = /*1*/{foo:/*2*/ 1,
|
||||
////bar: "tt",/*3*/
|
||||
////boo: /*4*/1 + 5}/*5*/;
|
||||
////
|
||||
////var x2 = /*6*/{foo/*7*/: 1,
|
||||
////bar: /*8*/"tt",boo:1+5}/*9*/;
|
||||
////
|
||||
////function Foo() {/*10*/
|
||||
////var typeICalc = {/*11*/
|
||||
////clear: {/*12*/
|
||||
////"()": [1, 2, 3]/*13*/
|
||||
////}/*14*/
|
||||
////}/*15*/
|
||||
////}/*16*/
|
||||
////
|
||||
////// Rule for object literal members for the "value" of the memebr to follow the indent/*17*/
|
||||
////// of the member, i.e. the relative position of the value is maintained when the member/*18*/
|
||||
////// is indented./*19*/
|
||||
////var x2 = {/*20*/
|
||||
//// foo:/*21*/
|
||||
////3,/*22*/
|
||||
//// 'bar':/*23*/
|
||||
//// { a: 1, b : 2}/*24*/
|
||||
////};/*25*/
|
||||
////
|
||||
////var x={ };/*26*/
|
||||
////var y = {};/*27*/
|
||||
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("var x = {");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs(" foo: 1,");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs(" bar: \"tt\",");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs(" boo: 1 + 5");
|
||||
goTo.marker("5");
|
||||
verify.currentLineContentIs("};");
|
||||
goTo.marker("6");
|
||||
verify.currentLineContentIs("var x2 = {");
|
||||
goTo.marker("7");
|
||||
verify.currentLineContentIs(" foo: 1,");
|
||||
goTo.marker("8");
|
||||
verify.currentLineContentIs(" bar: \"tt\", boo: 1 + 5");
|
||||
goTo.marker("9");
|
||||
verify.currentLineContentIs("};");
|
||||
goTo.marker("10");
|
||||
verify.currentLineContentIs("function Foo() {");
|
||||
goTo.marker("11");
|
||||
verify.currentLineContentIs(" var typeICalc = {");
|
||||
goTo.marker("12");
|
||||
verify.currentLineContentIs(" clear: {");
|
||||
goTo.marker("13");
|
||||
verify.currentLineContentIs(" \"()\": [1, 2, 3]");
|
||||
goTo.marker("14");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("15");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("16");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("17");
|
||||
verify.currentLineContentIs("// Rule for object literal members for the \"value\" of the memebr to follow the indent");
|
||||
goTo.marker("18");
|
||||
verify.currentLineContentIs("// of the member, i.e. the relative position of the value is maintained when the member");
|
||||
goTo.marker("19");
|
||||
verify.currentLineContentIs("// is indented.");
|
||||
goTo.marker("20");
|
||||
verify.currentLineContentIs("var x2 = {");
|
||||
goTo.marker("21");
|
||||
verify.currentLineContentIs(" foo:");
|
||||
goTo.marker("22");
|
||||
verify.currentLineContentIs(" 3,");
|
||||
goTo.marker("23");
|
||||
verify.currentLineContentIs(" 'bar':");
|
||||
goTo.marker("24");
|
||||
verify.currentLineContentIs(" { a: 1, b: 2 }");
|
||||
goTo.marker("25");
|
||||
verify.currentLineContentIs("};");
|
||||
goTo.marker("26");
|
||||
verify.currentLineContentIs("var x = {};");
|
||||
goTo.marker("27");
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////var x = /*1*/{foo:/*2*/ 1,
|
||||
////bar: "tt",/*3*/
|
||||
////boo: /*4*/1 + 5}/*5*/;
|
||||
////
|
||||
////var x2 = /*6*/{foo/*7*/: 1,
|
||||
////bar: /*8*/"tt",boo:1+5}/*9*/;
|
||||
////
|
||||
////function Foo() {/*10*/
|
||||
////var typeICalc = {/*11*/
|
||||
////clear: {/*12*/
|
||||
////"()": [1, 2, 3]/*13*/
|
||||
////}/*14*/
|
||||
////}/*15*/
|
||||
////}/*16*/
|
||||
////
|
||||
////// Rule for object literal members for the "value" of the memebr to follow the indent/*17*/
|
||||
////// of the member, i.e. the relative position of the value is maintained when the member/*18*/
|
||||
////// is indented./*19*/
|
||||
////var x2 = {/*20*/
|
||||
//// foo:/*21*/
|
||||
////3,/*22*/
|
||||
//// 'bar':/*23*/
|
||||
//// { a: 1, b : 2}/*24*/
|
||||
////};/*25*/
|
||||
////
|
||||
////var x={ };/*26*/
|
||||
////var y = {};/*27*/
|
||||
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("var x = {");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs(" foo: 1,");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs(" bar: \"tt\",");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs(" boo: 1 + 5");
|
||||
goTo.marker("5");
|
||||
verify.currentLineContentIs("};");
|
||||
goTo.marker("6");
|
||||
verify.currentLineContentIs("var x2 = {");
|
||||
goTo.marker("7");
|
||||
verify.currentLineContentIs(" foo: 1,");
|
||||
goTo.marker("8");
|
||||
verify.currentLineContentIs(" bar: \"tt\", boo: 1 + 5");
|
||||
goTo.marker("9");
|
||||
verify.currentLineContentIs("};");
|
||||
goTo.marker("10");
|
||||
verify.currentLineContentIs("function Foo() {");
|
||||
goTo.marker("11");
|
||||
verify.currentLineContentIs(" var typeICalc = {");
|
||||
goTo.marker("12");
|
||||
verify.currentLineContentIs(" clear: {");
|
||||
goTo.marker("13");
|
||||
verify.currentLineContentIs(" \"()\": [1, 2, 3]");
|
||||
goTo.marker("14");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("15");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("16");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("17");
|
||||
verify.currentLineContentIs("// Rule for object literal members for the \"value\" of the memebr to follow the indent");
|
||||
goTo.marker("18");
|
||||
verify.currentLineContentIs("// of the member, i.e. the relative position of the value is maintained when the member");
|
||||
goTo.marker("19");
|
||||
verify.currentLineContentIs("// is indented.");
|
||||
goTo.marker("20");
|
||||
verify.currentLineContentIs("var x2 = {");
|
||||
goTo.marker("21");
|
||||
verify.currentLineContentIs(" foo:");
|
||||
goTo.marker("22");
|
||||
verify.currentLineContentIs(" 3,");
|
||||
goTo.marker("23");
|
||||
verify.currentLineContentIs(" 'bar':");
|
||||
goTo.marker("24");
|
||||
verify.currentLineContentIs(" { a: 1, b: 2 }");
|
||||
goTo.marker("25");
|
||||
verify.currentLineContentIs("};");
|
||||
goTo.marker("26");
|
||||
verify.currentLineContentIs("var x = {};");
|
||||
goTo.marker("27");
|
||||
verify.currentLineContentIs("var y = {};");
|
||||
@ -1,10 +1,10 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////**/function T2_y()
|
||||
////{
|
||||
////Plugin.T1.t1_x();
|
||||
////}
|
||||
|
||||
format.document();
|
||||
goTo.marker();
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////**/function T2_y()
|
||||
////{
|
||||
////Plugin.T1.t1_x();
|
||||
////}
|
||||
|
||||
format.document();
|
||||
goTo.marker();
|
||||
verify.currentLineContentIs("function T2_y() {");
|
||||
@ -1,7 +1,7 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////var a=b+c^d-e*++f
|
||||
|
||||
goTo.eof();
|
||||
edit.insert(";");
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////var a=b+c^d-e*++f
|
||||
|
||||
goTo.eof();
|
||||
edit.insert(";");
|
||||
verify.currentFileContentIs("var a = b + c ^ d - e * ++f;");
|
||||
@ -1,16 +1,16 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////*1*/class C
|
||||
////{}/*2*/
|
||||
/////*3*/if (true)
|
||||
////{}/*4*/
|
||||
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("class C");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs("{ }");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs("if (true)");
|
||||
goTo.marker("4");
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////*1*/class C
|
||||
////{}/*2*/
|
||||
/////*3*/if (true)
|
||||
////{}/*4*/
|
||||
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("class C");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs("{ }");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs("if (true)");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs("{ }");
|
||||
@ -1,170 +1,170 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////*1*/do
|
||||
//// { var a/*2*/
|
||||
/////*3*/} while (1)
|
||||
/////*4*/function f() {
|
||||
/////*5*/ var s = 1
|
||||
/////*6*/ }
|
||||
/////*7*/switch (t) {
|
||||
/////*8*/ case 1:
|
||||
/////*9*/{
|
||||
/////*10*/test
|
||||
/////*11*/}
|
||||
/////*12*/}
|
||||
/////*13*/do{do{do{}while(a!==b)}while(a!==b)}while(a!==b)
|
||||
/////*14*/do{
|
||||
/////*15*/do{
|
||||
/////*16*/do{
|
||||
/////*17*/}while(a!==b)
|
||||
/////*18*/}while(a!==b)
|
||||
/////*19*/}while(a!==b)
|
||||
/////*20*/for(var i=0;i<10;i++){
|
||||
/////*21*/for(var j=0;j<10;j++){
|
||||
/////*22*/j-=i
|
||||
/////*23*/}/*24*/}
|
||||
/////*25*/function foo() {
|
||||
/////*26*/try {
|
||||
/////*27*/x+=2
|
||||
/////*28*/}
|
||||
/////*29*/catch( e){
|
||||
/////*30*/x+=2
|
||||
/////*31*/}finally {
|
||||
/////*32*/x+=2
|
||||
/////*33*/}
|
||||
/////*34*/}
|
||||
/////*35*/do { var a } while (1)
|
||||
//// foo(function (file) {/*49*/
|
||||
//// return 0/*50*/
|
||||
//// }).then(function (doc) {/*51*/
|
||||
//// return 1/*52*/
|
||||
//// });/*53*/
|
||||
/////*54*/if(1)
|
||||
/////*55*/if(1)
|
||||
/////*56*/x++
|
||||
/////*57*/else
|
||||
/////*58*/if(1)
|
||||
/////*59*/x+=2
|
||||
/////*60*/else
|
||||
/////*61*/x+=2
|
||||
////
|
||||
////
|
||||
////
|
||||
/////*62*/;
|
||||
//// do do do do/*63*/
|
||||
//// test;/*64*/
|
||||
//// while (0)/*65*/
|
||||
//// while (0)/*66*/
|
||||
//// while (0)/*67*/
|
||||
//// while (0)/*68*/
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("do {");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs(" var a");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs("} while (1)");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs("function f() {");
|
||||
goTo.marker("5");
|
||||
verify.currentLineContentIs(" var s = 1");
|
||||
goTo.marker("6");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("7");
|
||||
verify.currentLineContentIs("switch (t) {");
|
||||
goTo.marker("8");
|
||||
verify.currentLineContentIs(" case 1:");
|
||||
goTo.marker("9");
|
||||
verify.currentLineContentIs(" {");
|
||||
goTo.marker("10");
|
||||
verify.currentLineContentIs(" test");
|
||||
goTo.marker("11");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("12");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("13");
|
||||
verify.currentLineContentIs("do { do { do { } while (a !== b) } while (a !== b) } while (a !== b)");
|
||||
goTo.marker("14");
|
||||
verify.currentLineContentIs("do {");
|
||||
goTo.marker("15");
|
||||
verify.currentLineContentIs(" do {");
|
||||
goTo.marker("16");
|
||||
verify.currentLineContentIs(" do {");
|
||||
goTo.marker("17");
|
||||
verify.currentLineContentIs(" } while (a !== b)");
|
||||
goTo.marker("18");
|
||||
verify.currentLineContentIs(" } while (a !== b)");
|
||||
goTo.marker("19");
|
||||
verify.currentLineContentIs("} while (a !== b)");
|
||||
goTo.marker("20");
|
||||
verify.currentLineContentIs("for (var i = 0; i < 10; i++) {");
|
||||
goTo.marker("21");
|
||||
verify.currentLineContentIs(" for (var j = 0; j < 10; j++) {");
|
||||
goTo.marker("22");
|
||||
verify.currentLineContentIs(" j -= i");
|
||||
goTo.marker("23");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("24");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("25");
|
||||
verify.currentLineContentIs("function foo() {");
|
||||
goTo.marker("26");
|
||||
verify.currentLineContentIs(" try {");
|
||||
goTo.marker("27");
|
||||
verify.currentLineContentIs(" x += 2");
|
||||
goTo.marker("28");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("29");
|
||||
verify.currentLineContentIs(" catch (e) {");
|
||||
goTo.marker("30");
|
||||
verify.currentLineContentIs(" x += 2");
|
||||
goTo.marker("31");
|
||||
verify.currentLineContentIs(" } finally {");
|
||||
goTo.marker("32");
|
||||
verify.currentLineContentIs(" x += 2");
|
||||
goTo.marker("33");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("34");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("35");
|
||||
verify.currentLineContentIs("do { var a } while (1)");
|
||||
goTo.marker("49");
|
||||
verify.currentLineContentIs("foo(function(file) {");
|
||||
goTo.marker("50");
|
||||
verify.currentLineContentIs(" return 0");
|
||||
goTo.marker("51");
|
||||
verify.currentLineContentIs("}).then(function(doc) {");
|
||||
goTo.marker("52");
|
||||
verify.currentLineContentIs(" return 1");
|
||||
goTo.marker("53");
|
||||
verify.currentLineContentIs("});");
|
||||
goTo.marker("54");
|
||||
verify.currentLineContentIs("if (1)");
|
||||
goTo.marker("55");
|
||||
verify.currentLineContentIs(" if (1)");
|
||||
goTo.marker("56");
|
||||
verify.currentLineContentIs(" x++");
|
||||
goTo.marker("57");
|
||||
verify.currentLineContentIs(" else");
|
||||
goTo.marker("58");
|
||||
verify.currentLineContentIs(" if (1)");
|
||||
goTo.marker("59");
|
||||
verify.currentLineContentIs(" x += 2");
|
||||
goTo.marker("60");
|
||||
verify.currentLineContentIs(" else");
|
||||
goTo.marker("61");
|
||||
verify.currentLineContentIs(" x += 2");
|
||||
goTo.marker("62");
|
||||
verify.currentLineContentIs(" ;");
|
||||
goTo.marker("63");
|
||||
verify.currentLineContentIs("do do do do");
|
||||
goTo.marker("64");
|
||||
verify.currentLineContentIs(" test;");
|
||||
goTo.marker("65");
|
||||
verify.currentLineContentIs("while (0)");
|
||||
goTo.marker("66");
|
||||
verify.currentLineContentIs("while (0)");
|
||||
goTo.marker("67");
|
||||
verify.currentLineContentIs("while (0)");
|
||||
goTo.marker("68");
|
||||
verify.currentLineContentIs("while (0)");
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////*1*/do
|
||||
//// { var a/*2*/
|
||||
/////*3*/} while (1)
|
||||
/////*4*/function f() {
|
||||
/////*5*/ var s = 1
|
||||
/////*6*/ }
|
||||
/////*7*/switch (t) {
|
||||
/////*8*/ case 1:
|
||||
/////*9*/{
|
||||
/////*10*/test
|
||||
/////*11*/}
|
||||
/////*12*/}
|
||||
/////*13*/do{do{do{}while(a!==b)}while(a!==b)}while(a!==b)
|
||||
/////*14*/do{
|
||||
/////*15*/do{
|
||||
/////*16*/do{
|
||||
/////*17*/}while(a!==b)
|
||||
/////*18*/}while(a!==b)
|
||||
/////*19*/}while(a!==b)
|
||||
/////*20*/for(var i=0;i<10;i++){
|
||||
/////*21*/for(var j=0;j<10;j++){
|
||||
/////*22*/j-=i
|
||||
/////*23*/}/*24*/}
|
||||
/////*25*/function foo() {
|
||||
/////*26*/try {
|
||||
/////*27*/x+=2
|
||||
/////*28*/}
|
||||
/////*29*/catch( e){
|
||||
/////*30*/x+=2
|
||||
/////*31*/}finally {
|
||||
/////*32*/x+=2
|
||||
/////*33*/}
|
||||
/////*34*/}
|
||||
/////*35*/do { var a } while (1)
|
||||
//// foo(function (file) {/*49*/
|
||||
//// return 0/*50*/
|
||||
//// }).then(function (doc) {/*51*/
|
||||
//// return 1/*52*/
|
||||
//// });/*53*/
|
||||
/////*54*/if(1)
|
||||
/////*55*/if(1)
|
||||
/////*56*/x++
|
||||
/////*57*/else
|
||||
/////*58*/if(1)
|
||||
/////*59*/x+=2
|
||||
/////*60*/else
|
||||
/////*61*/x+=2
|
||||
////
|
||||
////
|
||||
////
|
||||
/////*62*/;
|
||||
//// do do do do/*63*/
|
||||
//// test;/*64*/
|
||||
//// while (0)/*65*/
|
||||
//// while (0)/*66*/
|
||||
//// while (0)/*67*/
|
||||
//// while (0)/*68*/
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("do {");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs(" var a");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs("} while (1)");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs("function f() {");
|
||||
goTo.marker("5");
|
||||
verify.currentLineContentIs(" var s = 1");
|
||||
goTo.marker("6");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("7");
|
||||
verify.currentLineContentIs("switch (t) {");
|
||||
goTo.marker("8");
|
||||
verify.currentLineContentIs(" case 1:");
|
||||
goTo.marker("9");
|
||||
verify.currentLineContentIs(" {");
|
||||
goTo.marker("10");
|
||||
verify.currentLineContentIs(" test");
|
||||
goTo.marker("11");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("12");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("13");
|
||||
verify.currentLineContentIs("do { do { do { } while (a !== b) } while (a !== b) } while (a !== b)");
|
||||
goTo.marker("14");
|
||||
verify.currentLineContentIs("do {");
|
||||
goTo.marker("15");
|
||||
verify.currentLineContentIs(" do {");
|
||||
goTo.marker("16");
|
||||
verify.currentLineContentIs(" do {");
|
||||
goTo.marker("17");
|
||||
verify.currentLineContentIs(" } while (a !== b)");
|
||||
goTo.marker("18");
|
||||
verify.currentLineContentIs(" } while (a !== b)");
|
||||
goTo.marker("19");
|
||||
verify.currentLineContentIs("} while (a !== b)");
|
||||
goTo.marker("20");
|
||||
verify.currentLineContentIs("for (var i = 0; i < 10; i++) {");
|
||||
goTo.marker("21");
|
||||
verify.currentLineContentIs(" for (var j = 0; j < 10; j++) {");
|
||||
goTo.marker("22");
|
||||
verify.currentLineContentIs(" j -= i");
|
||||
goTo.marker("23");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("24");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("25");
|
||||
verify.currentLineContentIs("function foo() {");
|
||||
goTo.marker("26");
|
||||
verify.currentLineContentIs(" try {");
|
||||
goTo.marker("27");
|
||||
verify.currentLineContentIs(" x += 2");
|
||||
goTo.marker("28");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("29");
|
||||
verify.currentLineContentIs(" catch (e) {");
|
||||
goTo.marker("30");
|
||||
verify.currentLineContentIs(" x += 2");
|
||||
goTo.marker("31");
|
||||
verify.currentLineContentIs(" } finally {");
|
||||
goTo.marker("32");
|
||||
verify.currentLineContentIs(" x += 2");
|
||||
goTo.marker("33");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("34");
|
||||
verify.currentLineContentIs("}");
|
||||
goTo.marker("35");
|
||||
verify.currentLineContentIs("do { var a } while (1)");
|
||||
goTo.marker("49");
|
||||
verify.currentLineContentIs("foo(function(file) {");
|
||||
goTo.marker("50");
|
||||
verify.currentLineContentIs(" return 0");
|
||||
goTo.marker("51");
|
||||
verify.currentLineContentIs("}).then(function(doc) {");
|
||||
goTo.marker("52");
|
||||
verify.currentLineContentIs(" return 1");
|
||||
goTo.marker("53");
|
||||
verify.currentLineContentIs("});");
|
||||
goTo.marker("54");
|
||||
verify.currentLineContentIs("if (1)");
|
||||
goTo.marker("55");
|
||||
verify.currentLineContentIs(" if (1)");
|
||||
goTo.marker("56");
|
||||
verify.currentLineContentIs(" x++");
|
||||
goTo.marker("57");
|
||||
verify.currentLineContentIs(" else");
|
||||
goTo.marker("58");
|
||||
verify.currentLineContentIs(" if (1)");
|
||||
goTo.marker("59");
|
||||
verify.currentLineContentIs(" x += 2");
|
||||
goTo.marker("60");
|
||||
verify.currentLineContentIs(" else");
|
||||
goTo.marker("61");
|
||||
verify.currentLineContentIs(" x += 2");
|
||||
goTo.marker("62");
|
||||
verify.currentLineContentIs(" ;");
|
||||
goTo.marker("63");
|
||||
verify.currentLineContentIs("do do do do");
|
||||
goTo.marker("64");
|
||||
verify.currentLineContentIs(" test;");
|
||||
goTo.marker("65");
|
||||
verify.currentLineContentIs("while (0)");
|
||||
goTo.marker("66");
|
||||
verify.currentLineContentIs("while (0)");
|
||||
goTo.marker("67");
|
||||
verify.currentLineContentIs("while (0)");
|
||||
goTo.marker("68");
|
||||
verify.currentLineContentIs("while (0)");
|
||||
|
||||
@ -1,32 +1,32 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////module Tools {/*1*/
|
||||
//// export enum NodeType {/*2*/
|
||||
//// Error,/*3*/
|
||||
//// Comment,/*4*/
|
||||
//// } /*5*/
|
||||
//// export enum foob/*6*/
|
||||
//// {
|
||||
//// Blah=1, Bleah=2/*7*/
|
||||
//// }/*8*/
|
||||
////}/*9*/
|
||||
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("module Tools {");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs(" export enum NodeType {");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs(" Error,");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs(" Comment,");
|
||||
goTo.marker("5");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("6");
|
||||
verify.currentLineContentIs(" export enum foob {");
|
||||
goTo.marker("7");
|
||||
verify.currentLineContentIs(" Blah = 1, Bleah = 2");
|
||||
goTo.marker("8");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("9");
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////module Tools {/*1*/
|
||||
//// export enum NodeType {/*2*/
|
||||
//// Error,/*3*/
|
||||
//// Comment,/*4*/
|
||||
//// } /*5*/
|
||||
//// export enum foob/*6*/
|
||||
//// {
|
||||
//// Blah=1, Bleah=2/*7*/
|
||||
//// }/*8*/
|
||||
////}/*9*/
|
||||
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("module Tools {");
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs(" export enum NodeType {");
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs(" Error,");
|
||||
goTo.marker("4");
|
||||
verify.currentLineContentIs(" Comment,");
|
||||
goTo.marker("5");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("6");
|
||||
verify.currentLineContentIs(" export enum foob {");
|
||||
goTo.marker("7");
|
||||
verify.currentLineContentIs(" Blah = 1, Bleah = 2");
|
||||
goTo.marker("8");
|
||||
verify.currentLineContentIs(" }");
|
||||
goTo.marker("9");
|
||||
verify.currentLineContentIs("}");
|
||||
@ -19,4 +19,4 @@ verify.currentLineContentIs('4 +:5');
|
||||
goTo.marker('4');
|
||||
verify.currentLineContentIs(' : T) { }');
|
||||
goTo.marker('5');
|
||||
verify.currentLineContentIs('var x =');
|
||||
verify.currentLineContentIs('var x =');
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
/////*1*/class test { constructor () { } }
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
/////*1*/class test { constructor () { } }
|
||||
format.document();
|
||||
goTo.marker("1");
|
||||
verify.currentLineContentIs("class test { constructor() { } }");
|
||||
@ -1,15 +1,15 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////class Greeter3 {
|
||||
//// stop() {
|
||||
//// /*2*/var s = "hello\
|
||||
////"/*1*/
|
||||
//// }
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
edit.insert("\r\n");
|
||||
// We actually need to verify smart (virtual) identation here rather than actual identation. Fourslash support is required.
|
||||
verify.indentationIs(8);
|
||||
goTo.marker("2");
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////class Greeter3 {
|
||||
//// stop() {
|
||||
//// /*2*/var s = "hello\
|
||||
////"/*1*/
|
||||
//// }
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
edit.insert("\r\n");
|
||||
// We actually need to verify smart (virtual) identation here rather than actual identation. Fourslash support is required.
|
||||
verify.indentationIs(8);
|
||||
goTo.marker("2");
|
||||
verify.currentLineContentIs(" var s = \"hello\\");
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user