mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-11 01:34:55 -06:00
Update tests
This commit is contained in:
parent
c8cd748e48
commit
32b4e46c1d
@ -8,7 +8,7 @@
|
||||
//// class Foo {
|
||||
//// constructor() {
|
||||
//// this.bar = 'world';
|
||||
//// this.thing = 42;
|
||||
//// this.thing = () => 0;
|
||||
//// this.union = 'foo';
|
||||
//// this.union = 100;
|
||||
//// }
|
||||
@ -25,7 +25,6 @@ verify.completionListContains("union", /*displayText*/ undefined, /*documentatio
|
||||
|
||||
edit.insert('bar.');
|
||||
verify.completionListContains("substr", /*displayText*/ undefined, /*documentation*/ undefined, "method");
|
||||
|
||||
edit.backspace('bar.'.length);
|
||||
|
||||
edit.insert('union.');
|
||||
|
||||
22
tests/cases/fourslash/javaScriptClass4.ts
Normal file
22
tests/cases/fourslash/javaScriptClass4.ts
Normal file
@ -0,0 +1,22 @@
|
||||
///<reference path="fourslash.ts" />
|
||||
|
||||
// Classes have their shape inferred from assignments
|
||||
// to properties of 'this' in the constructor
|
||||
|
||||
// @allowNonTsExtensions: true
|
||||
// @Filename: Foo.js
|
||||
//// class Foo {
|
||||
//// constructor() {
|
||||
//// /**
|
||||
//// * @type {string}
|
||||
//// */
|
||||
//// this.baz = null;
|
||||
//// }
|
||||
//// }
|
||||
//// var x = new Foo();
|
||||
//// x/**/
|
||||
|
||||
goTo.marker();
|
||||
edit.insert('.baz.');
|
||||
verify.completionListContains("substr", /*displayText*/ undefined, /*documentation*/ undefined, "method");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user