From 0060b4d66332adb2fc5eb99b84f3e2095d176d58 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Thu, 31 Mar 2016 09:32:34 -0700 Subject: [PATCH] Test that signature help doesn't show 'this' --- tests/cases/fourslash/signatureHelpThis.ts | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 tests/cases/fourslash/signatureHelpThis.ts diff --git a/tests/cases/fourslash/signatureHelpThis.ts b/tests/cases/fourslash/signatureHelpThis.ts new file mode 100644 index 00000000000..2ac19c823c0 --- /dev/null +++ b/tests/cases/fourslash/signatureHelpThis.ts @@ -0,0 +1,43 @@ +/// +////class Foo { +//// public implicitAny(n: number) { +//// } +//// public explicitThis(this: this, n: number) { +//// console.log(this); +//// } +//// public explicitClass(this: Foo, n: number) { +//// console.log(this); +//// } +////} +//// +////function implicitAny(x: number): void { +//// return this; +////} +////function explicitVoid(this: void, x: number): void { +//// return this; +////} +////function explicitLiteral(this: { n: number }, x: number): void { +//// console.log(this); +////} +////let foo = new Foo(); +////foo.implicitAny(/*1*/); +////foo.explicitThis(/*2*/); +////foo.explicitClass(/*3*/); +////implicitAny(/*4*/12); +////explicitVoid(/*5*/13); +////let o = { n: 14, m: explicitLiteral }; +////o.m(/*6*/); + + +goTo.marker('1'); +verify.currentParameterHelpArgumentNameIs("n"); +goTo.marker('2'); +verify.currentParameterHelpArgumentNameIs("n"); +goTo.marker('3'); +verify.currentParameterHelpArgumentNameIs("n"); +goTo.marker('4'); +verify.currentParameterHelpArgumentNameIs("x"); +goTo.marker('5'); +verify.currentParameterHelpArgumentNameIs("x"); +goTo.marker('6'); +verify.currentParameterHelpArgumentNameIs("x");