File: genericParameterHelp.ts

package info (click to toggle)
node-typescript 4.8.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 523,068 kB
  • sloc: javascript: 1,735,777; makefile: 7; sh: 1
file content (28 lines) | stat: -rw-r--r-- 940 bytes parent folder | download | duplicates (5)
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
/// <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);

verify.signatureHelp(
    {
        marker: "1",
        text: "testFunction<T extends IFoo, U, M extends IFoo>(a: T, b: U, c: M): M",
        parameterCount: 3,
        parameterName: "T",
        parameterSpan: "T extends IFoo",
    },
    { marker: "2", parameterName: "U", parameterSpan: "U" },
    { marker: "3", parameterName: "a", parameterSpan: "a: any" },
    { marker: "4", parameterName: "M", parameterSpan: "M extends IFoo" },
    { marker: "5", parameterName: "M", parameterSpan: "M extends IFoo" },
);