File: genericParameterHelp.ts

package info (click to toggle)
node-typescript 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 203,952 kB
  • ctags: 52,987
  • sloc: sh: 11; makefile: 5
file content (37 lines) | stat: -rw-r--r-- 1,166 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/// <reference path="fourslash.ts"/>

////interface IFoo { }
////
////function testFunction<T extends IFoo, U, M extends IFoo>(a: T, b: U, c: M): M {
////    return null;
////}
////
////// Function calls
////testFunction</*1*/
////testFunction<any, /*2*/
////testFunction<any, any, any>(/*3*/
////testFunction<any, any,/*4*/ any>(null, null, null);
////testFunction<, ,/*5*/>(null, null, null);

// goTo.marker("1");
//  verify.currentSignatureParameterCountIs(3);
//  verify.currentSignatureHelpIs("testFunction<T extends IFoo, U, M extends IFoo>(a: T, b: U, c: M): M");

//  verify.currentParameterHelpArgumentNameIs("T");
//  verify.currentParameterSpanIs("T extends IFoo");

//  goTo.marker("2");
//  verify.currentParameterHelpArgumentNameIs("U");
//  verify.currentParameterSpanIs("U");

goTo.marker("3");
verify.currentParameterHelpArgumentNameIs("a");
verify.currentParameterSpanIs("a: T");

goTo.marker("4");
verify.currentParameterHelpArgumentNameIs("M");
verify.currentParameterSpanIs("M extends IFoo");

goTo.marker("5");
verify.currentParameterHelpArgumentNameIs("M");
verify.currentParameterSpanIs("M extends IFoo");