Added tests.
This commit is contained in:
parent
88adb8fbb4
commit
693da9a6df
34 changed files with 600 additions and 0 deletions
12
tests/cases/fourslash/completionListInClosedFunction01.ts
Normal file
12
tests/cases/fourslash/completionListInClosedFunction01.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// /*1*/
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
18
tests/cases/fourslash/completionListInClosedFunction02.ts
Normal file
18
tests/cases/fourslash/completionListInClosedFunction02.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// function bar(a: number, b: string, c: typeof /*1*/) {
|
||||
//// }
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("a");
|
||||
verify.memberListContains("b");
|
||||
verify.memberListContains("c"); // questionable
|
19
tests/cases/fourslash/completionListInClosedFunction03.ts
Normal file
19
tests/cases/fourslash/completionListInClosedFunction03.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// function bar(a: number, b: string, c: typeof x = /*1*/) {
|
||||
////
|
||||
//// }
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("a");
|
||||
verify.memberListContains("b");
|
||||
verify.memberListContains("c"); // questionable
|
19
tests/cases/fourslash/completionListInClosedFunction04.ts
Normal file
19
tests/cases/fourslash/completionListInClosedFunction04.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// function bar(a: number, b: string = /*1*/, c: typeof x = "hello") {
|
||||
////
|
||||
//// }
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("a");
|
||||
verify.memberListContains("b");
|
||||
verify.memberListContains("c"); // definitely questionable
|
21
tests/cases/fourslash/completionListInClosedFunction05.ts
Normal file
21
tests/cases/fourslash/completionListInClosedFunction05.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// function bar(a: number, b: string = "hello", c: typeof x = "hello") {
|
||||
//// var v = /*1*/
|
||||
//// }
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("a");
|
||||
verify.memberListContains("b");
|
||||
verify.memberListContains("c");
|
||||
|
||||
verify.memberListContains("v"); // questionable
|
14
tests/cases/fourslash/completionListInClosedFunction06.ts
Normal file
14
tests/cases/fourslash/completionListInClosedFunction06.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface MyType {
|
||||
////}
|
||||
////
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// function bar(a: number, b: string = "hello", c: typeof x = "hello") {
|
||||
//// var v = (x: /*1*/);
|
||||
//// }
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("MyType");
|
25
tests/cases/fourslash/completionListInClosedFunction07.ts
Normal file
25
tests/cases/fourslash/completionListInClosedFunction07.ts
Normal file
|
@ -0,0 +1,25 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface MyType {
|
||||
////}
|
||||
////
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// function bar(a: number, b: string = "hello", c: typeof x = "hello") {
|
||||
//// var v = (p: MyType) => /*1*/;
|
||||
//// }
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("a");
|
||||
verify.memberListContains("b");
|
||||
verify.memberListContains("c");
|
||||
|
||||
verify.memberListContains("v");
|
||||
verify.memberListContains("p");
|
|
@ -0,0 +1,16 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface I<TString, TNumber> {
|
||||
//// [s: string]: TString;
|
||||
//// [s: number]: TNumber;
|
||||
////}
|
||||
////
|
||||
////declare function foo<TString, TNumber>(obj: I<TString, TNumber>): { str: T/*1*/ }
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("I");
|
||||
verify.memberListContains("TString");
|
||||
verify.memberListContains("TNumber");
|
||||
verify.not.memberListContains("foo");
|
||||
verify.not.memberListContains("obj");
|
|
@ -0,0 +1,16 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface I<TString, TNumber> {
|
||||
//// [s: string]: TString;
|
||||
//// [s: number]: TNumber;
|
||||
////}
|
||||
////
|
||||
////declare function foo<TString, TNumber>(obj: I<TString, TNumber>): { str: TStr/*1*/ }
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("I");
|
||||
verify.memberListContains("TString");
|
||||
verify.not.memberListContains("TNumber");
|
||||
verify.not.memberListContains("foo");
|
||||
verify.not.memberListContains("obj");
|
|
@ -0,0 +1,16 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface I<TString, TNumber> {
|
||||
//// [s: string]: TString;
|
||||
//// [s: number]: TNumber;
|
||||
////}
|
||||
////
|
||||
////declare function foo<TString, TNumber>(obj: I<TString, TNumber>): { str: TString/*1*/ }
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("I");
|
||||
verify.memberListContains("TString");
|
||||
verify.not.memberListContains("TNumber");
|
||||
verify.not.memberListContains("foo");
|
||||
verify.not.memberListContains("obj");
|
|
@ -0,0 +1,16 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface I<TString, TNumber> {
|
||||
//// [s: string]: TString;
|
||||
//// [s: number]: TNumber;
|
||||
////}
|
||||
////
|
||||
////declare function foo<TString, TNumber>(obj: I<TString, TNumber>): { /*1*/ }
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.not.memberListContains("I");
|
||||
verify.not.memberListContains("TString");
|
||||
verify.not.memberListContains("TNumber");
|
||||
verify.not.memberListContains("foo");
|
||||
verify.not.memberListContains("obj");
|
12
tests/cases/fourslash/completionListInUnclosedFunction01.ts
Normal file
12
tests/cases/fourslash/completionListInUnclosedFunction01.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// /*1*/
|
||||
////
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
16
tests/cases/fourslash/completionListInUnclosedFunction02.ts
Normal file
16
tests/cases/fourslash/completionListInUnclosedFunction02.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// function bar(a: number, b: string, c: typeof /*1*/
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("a");
|
||||
verify.memberListContains("b");
|
||||
verify.memberListContains("c"); // questionable
|
17
tests/cases/fourslash/completionListInUnclosedFunction03.ts
Normal file
17
tests/cases/fourslash/completionListInUnclosedFunction03.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// function bar(a: number, b: string, c: typeof /*1*/
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("a");
|
||||
verify.memberListContains("b");
|
||||
verify.memberListContains("c"); // questionable
|
16
tests/cases/fourslash/completionListInUnclosedFunction04.ts
Normal file
16
tests/cases/fourslash/completionListInUnclosedFunction04.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// function bar(a: number, b: string, c: typeof x = /*1*/
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("a");
|
||||
verify.memberListContains("b");
|
||||
verify.memberListContains("c"); // questionable
|
17
tests/cases/fourslash/completionListInUnclosedFunction05.ts
Normal file
17
tests/cases/fourslash/completionListInUnclosedFunction05.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// function bar(a: number, b: string, c: typeof x = /*1*/
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("a");
|
||||
verify.memberListContains("b");
|
||||
verify.memberListContains("c"); // questionable
|
17
tests/cases/fourslash/completionListInUnclosedFunction06.ts
Normal file
17
tests/cases/fourslash/completionListInUnclosedFunction06.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// function bar(a: number, b: string = /*1*/, c: typeof x = "hello"
|
||||
////
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("a");
|
||||
verify.memberListContains("b");
|
||||
verify.memberListContains("c"); // definitely questionable
|
17
tests/cases/fourslash/completionListInUnclosedFunction07.ts
Normal file
17
tests/cases/fourslash/completionListInUnclosedFunction07.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// function bar(a: number, b: string = /*1*/, c: typeof x = "hello"
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("a");
|
||||
verify.memberListContains("b");
|
||||
verify.memberListContains("c"); // definitely questionable
|
19
tests/cases/fourslash/completionListInUnclosedFunction08.ts
Normal file
19
tests/cases/fourslash/completionListInUnclosedFunction08.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// function bar(a: number, b: string = "hello", c: typeof x = "hello") {
|
||||
//// var v = /*1*/
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("a");
|
||||
verify.memberListContains("b");
|
||||
verify.memberListContains("c");
|
||||
|
||||
verify.memberListContains("v"); // questionable
|
20
tests/cases/fourslash/completionListInUnclosedFunction09.ts
Normal file
20
tests/cases/fourslash/completionListInUnclosedFunction09.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// function bar(a: number, b: string = "hello", c: typeof x = "hello") {
|
||||
//// var v = /*1*/
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("a");
|
||||
verify.memberListContains("b");
|
||||
verify.memberListContains("c");
|
||||
|
||||
verify.memberListContains("v"); // questionable
|
12
tests/cases/fourslash/completionListInUnclosedFunction10.ts
Normal file
12
tests/cases/fourslash/completionListInUnclosedFunction10.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface MyType {
|
||||
////}
|
||||
////
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// function bar(a: number, b: string = "hello", c: typeof x = "hello") {
|
||||
//// var v = (p: /*1*/
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("MyType");
|
12
tests/cases/fourslash/completionListInUnclosedFunction11.ts
Normal file
12
tests/cases/fourslash/completionListInUnclosedFunction11.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface MyType {
|
||||
////}
|
||||
////
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// function bar(a: number, b: string = "hello", c: typeof x = "hello") {
|
||||
//// var v = (p: /*1*/
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("MyType");
|
13
tests/cases/fourslash/completionListInUnclosedFunction12.ts
Normal file
13
tests/cases/fourslash/completionListInUnclosedFunction12.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface MyType {
|
||||
////}
|
||||
////
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// function bar(a: number, b: string = "hello", c: typeof x = "hello") {
|
||||
//// var v = (p: /*1*/
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("MyType");
|
14
tests/cases/fourslash/completionListInUnclosedFunction13.ts
Normal file
14
tests/cases/fourslash/completionListInUnclosedFunction13.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface MyType {
|
||||
////}
|
||||
////
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// function bar(a: number, b: string = "hello", c: typeof x = "hello") {
|
||||
//// var v = (p: /*1*/
|
||||
//// }
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("MyType");
|
25
tests/cases/fourslash/completionListInUnclosedFunction14.ts
Normal file
25
tests/cases/fourslash/completionListInUnclosedFunction14.ts
Normal file
|
@ -0,0 +1,25 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface MyType {
|
||||
////}
|
||||
////
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// function bar(a: number, b: string = "hello", c: typeof x = "hello") {
|
||||
//// var v = (p: MyType) => /*1*/
|
||||
//// }
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("a");
|
||||
verify.memberListContains("b");
|
||||
verify.memberListContains("c");
|
||||
|
||||
verify.memberListContains("v");
|
||||
verify.memberListContains("p");
|
24
tests/cases/fourslash/completionListInUnclosedFunction15.ts
Normal file
24
tests/cases/fourslash/completionListInUnclosedFunction15.ts
Normal file
|
@ -0,0 +1,24 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface MyType {
|
||||
////}
|
||||
////
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// function bar(a: number, b: string = "hello", c: typeof x = "hello") {
|
||||
//// var v = (p: MyType) => /*1*/
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("a");
|
||||
verify.memberListContains("b");
|
||||
verify.memberListContains("c");
|
||||
|
||||
verify.memberListContains("v");
|
||||
verify.memberListContains("p");
|
23
tests/cases/fourslash/completionListInUnclosedFunction16.ts
Normal file
23
tests/cases/fourslash/completionListInUnclosedFunction16.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface MyType {
|
||||
////}
|
||||
////
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// function bar(a: number, b: string = "hello", c: typeof x = "hello") {
|
||||
//// var v = (p: MyType) => /*1*/
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("a");
|
||||
verify.memberListContains("b");
|
||||
verify.memberListContains("c");
|
||||
|
||||
verify.memberListContains("v");
|
||||
verify.memberListContains("p");
|
23
tests/cases/fourslash/completionListInUnclosedFunction17.ts
Normal file
23
tests/cases/fourslash/completionListInUnclosedFunction17.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface MyType {
|
||||
////}
|
||||
////
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// function bar(a: number, b: string = "hello", c: typeof x = "hello") {
|
||||
//// var v = (p: MyType) => y + /*1*/
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("a");
|
||||
verify.memberListContains("b");
|
||||
verify.memberListContains("c");
|
||||
|
||||
verify.memberListContains("v");
|
||||
verify.memberListContains("p");
|
24
tests/cases/fourslash/completionListInUnclosedFunction18.ts
Normal file
24
tests/cases/fourslash/completionListInUnclosedFunction18.ts
Normal file
|
@ -0,0 +1,24 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface MyType {
|
||||
////}
|
||||
////
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// function bar(a: number, b: string = "hello", c: typeof x = "hello") {
|
||||
//// var v = (p: MyType) => y + /*1*/
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("a");
|
||||
verify.memberListContains("b");
|
||||
verify.memberListContains("c");
|
||||
|
||||
verify.memberListContains("v");
|
||||
verify.memberListContains("p");
|
23
tests/cases/fourslash/completionListInUnclosedFunction19.ts
Normal file
23
tests/cases/fourslash/completionListInUnclosedFunction19.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface MyType {
|
||||
////}
|
||||
////
|
||||
////function foo(x: string, y: number, z: boolean) {
|
||||
//// function bar(a: number, b: string = "hello", c: typeof x = "hello") {
|
||||
//// var v = (p: MyType) => { return y + /*1*/
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("foo");
|
||||
verify.memberListContains("x");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("z");
|
||||
|
||||
verify.memberListContains("bar");
|
||||
verify.memberListContains("a");
|
||||
verify.memberListContains("b");
|
||||
verify.memberListContains("c");
|
||||
|
||||
verify.memberListContains("v");
|
||||
verify.memberListContains("p");
|
|
@ -0,0 +1,16 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface I<TString, TNumber> {
|
||||
//// [s: string]: TString;
|
||||
//// [s: number]: TNumber;
|
||||
////}
|
||||
////
|
||||
////declare function foo<TString, TNumber>(obj: I<TString, TNumber>): { str: T/*1*/
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("I");
|
||||
verify.memberListContains("TString");
|
||||
verify.memberListContains("TNumber");
|
||||
verify.not.memberListContains("foo");
|
||||
verify.not.memberListContains("obj");
|
|
@ -0,0 +1,16 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface I<TString, TNumber> {
|
||||
//// [s: string]: TString;
|
||||
//// [s: number]: TNumber;
|
||||
////}
|
||||
////
|
||||
////declare function foo<TString, TNumber>(obj: I<TString, TNumber>): { str: TStr/*1*/
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("I");
|
||||
verify.memberListContains("TString");
|
||||
verify.not.memberListContains("TNumber");
|
||||
verify.not.memberListContains("foo");
|
||||
verify.not.memberListContains("obj");
|
|
@ -0,0 +1,16 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface I<TString, TNumber> {
|
||||
//// [s: string]: TString;
|
||||
//// [s: number]: TNumber;
|
||||
////}
|
||||
////
|
||||
////declare function foo<TString, TNumber>(obj: I<TString, TNumber>): { str: TString/*1*/
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.memberListContains("I");
|
||||
verify.memberListContains("TString");
|
||||
verify.not.memberListContains("TNumber");
|
||||
verify.not.memberListContains("foo");
|
||||
verify.not.memberListContains("obj");
|
|
@ -0,0 +1,16 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface I<TString, TNumber> {
|
||||
//// [s: string]: TString;
|
||||
//// [s: number]: TNumber;
|
||||
////}
|
||||
////
|
||||
////declare function foo<TString, TNumber>(obj: I<TString, TNumber>): { /*1*/
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
verify.not.memberListContains("I");
|
||||
verify.not.memberListContains("TString");
|
||||
verify.not.memberListContains("TNumber");
|
||||
verify.not.memberListContains("foo");
|
||||
verify.not.memberListContains("obj");
|
Loading…
Reference in a new issue