Skip to content

Commit 32b4e46

Browse files
committed
Update tests
1 parent c8cd748 commit 32b4e46

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

tests/cases/fourslash/javaScriptClass1.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//// class Foo {
99
//// constructor() {
1010
//// this.bar = 'world';
11-
//// this.thing = 42;
11+
//// this.thing = () => 0;
1212
//// this.union = 'foo';
1313
//// this.union = 100;
1414
//// }
@@ -25,7 +25,6 @@ verify.completionListContains("union", /*displayText*/ undefined, /*documentatio
2525

2626
edit.insert('bar.');
2727
verify.completionListContains("substr", /*displayText*/ undefined, /*documentation*/ undefined, "method");
28-
2928
edit.backspace('bar.'.length);
3029

3130
edit.insert('union.');
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
///<reference path="fourslash.ts" />
2+
3+
// Classes have their shape inferred from assignments
4+
// to properties of 'this' in the constructor
5+
6+
// @allowNonTsExtensions: true
7+
// @Filename: Foo.js
8+
//// class Foo {
9+
//// constructor() {
10+
//// /**
11+
//// * @type {string}
12+
//// */
13+
//// this.baz = null;
14+
//// }
15+
//// }
16+
//// var x = new Foo();
17+
//// x/**/
18+
19+
goTo.marker();
20+
edit.insert('.baz.');
21+
verify.completionListContains("substr", /*displayText*/ undefined, /*documentation*/ undefined, "method");
22+

0 commit comments

Comments
 (0)