Skip to content

Commit 4a9b120

Browse files
committed
Test adding members to JS variables whose initialisers are functions
1 parent 6425837 commit 4a9b120

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/// <reference path="fourslash.ts" />
2+
// @allowJs: true
3+
// @Filename: something.js
4+
////var C = function () { }
5+
/////**
6+
//// * The prototype method.
7+
//// * @param {string} a Parameter definition.
8+
//// */
9+
////function f(a) {}
10+
////C.prototype.m = f;
11+
////
12+
////var x = new C();
13+
////x/*1*/./*2*/m();
14+
goTo.marker('1');
15+
verify.quickInfoIs('var x: {\n m: (a: string) => void;\n}');
16+
goTo.marker('2');
17+
verify.completionListContains('m', '(property) C.m: (a: string) => void', 'The prototype method.');

0 commit comments

Comments
 (0)