mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-12 04:17:34 -06:00
Test adding members to JS variables whose initialisers are functions
This commit is contained in:
parent
642583771d
commit
4a9b1209ae
@ -0,0 +1,17 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
// @allowJs: true
|
||||
// @Filename: something.js
|
||||
////var C = function () { }
|
||||
/////**
|
||||
//// * The prototype method.
|
||||
//// * @param {string} a Parameter definition.
|
||||
//// */
|
||||
////function f(a) {}
|
||||
////C.prototype.m = f;
|
||||
////
|
||||
////var x = new C();
|
||||
////x/*1*/./*2*/m();
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs('var x: {\n m: (a: string) => void;\n}');
|
||||
goTo.marker('2');
|
||||
verify.completionListContains('m', '(property) C.m: (a: string) => void', 'The prototype method.');
|
||||
Loading…
x
Reference in New Issue
Block a user