Skip to content

Commit 4c3589f

Browse files
committed
Update tests to remove other type paramters from constraints
1 parent cb30eaf commit 4c3589f

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

tests/cases/fourslash/memberCompletionOnTypeParameters.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//// y: string;
66
////}
77
////
8-
////function foo<S, T extends IFoo, U extends T, V extends U>() {
8+
////function foo<S, T extends IFoo, U extends Object, V extends IFoo>() {
99
//// var s:S, t: T, u: U, v: V;
1010
//// s./*S*/; // no constraint, no completion
1111
//// t./*T*/; // IFoo
@@ -22,9 +22,8 @@ verify.memberListContains("y", "string");
2222
verify.memberListCount(2);
2323

2424
goTo.marker("U");
25-
verify.memberListContains("x", "number");
26-
verify.memberListContains("y", "string");
27-
verify.memberListCount(2);
25+
verify.memberListContains("toString", "() => string");
26+
verify.memberListCount(7); // constructor, toString, toLocaleString, valueOf, hasOwnProperty, isPrototypeOf, propertyIsEnumerable
2827

2928
goTo.marker("V");
3029
verify.memberListContains("x", "number");

tests/cases/fourslash/memberCompletionOnTypeParameters2.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/// <reference path='fourslash.ts'/>
2-
1+
/// <reference path='fourslash.ts'/>
2+
33
////class A {
44
//// foo(): string { return ''; }
55
////}
@@ -10,7 +10,7 @@
1010
//// }
1111
////}
1212
////
13-
////class C<U extends T, T extends A> {
13+
////class C<U extends A, T extends A> {
1414
//// x: U;
1515
//// y = this.x./**/ // completion list here
1616
////}

0 commit comments

Comments
 (0)