File: signatureHelpTypeArguments2.ts

package info (click to toggle)
node-typescript 4.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 396,552 kB
  • sloc: javascript: 1,444,377; makefile: 7; sh: 3
file content (37 lines) | stat: -rw-r--r-- 1,141 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"/>

/////** some documentation
//// * @template T some documentation 2
//// * @template W
//// * @template U,V others
//// * @param a ok
//// * @param b not ok
//// */
////function f<T, U, V, W>(a: number, b: string, c: boolean): void { }
////f</*f0*/;
////f<number, /*f1*/;
////f<number, string, /*f2*/;
////f<number, string, boolean, /*f3*/;

function build(marker: string, parameterName: string, parameterDocComment: string) {
    return {
        marker,
        text: "f<T, U, V, W>(a: number, b: string, c: boolean): void",
        parameterName,
        parameterSpan: parameterName,
        docComment: "some documentation",
        parameterDocComment,
        tags: [{ name: "template", text: "T some documentation 2" },
               { name: "template", text: "W" },
               { name: "template", text: "U, V others" },
               { name: "param", text: "a ok" },
               { name: "param", text: "b not ok" }]
    }
}

verify.signatureHelp(
    build("f0", "T", "some documentation 2"),
    build("f1", "U", "others"),
    build("f2", "V", "others"),
    build("f3", "W", ""),
);