mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
188 lines
4.2 KiB
Plaintext
188 lines
4.2 KiB
Plaintext
// === SignatureHelp ===
|
|
=== /signatureHelpRestArgs1.ts ===
|
|
// function fn(a: number, b: number, c: number) {}
|
|
// const a = [1, 2] as const;
|
|
// const b = [1] as const;
|
|
//
|
|
// fn(...a, );
|
|
// ^
|
|
// | ----------------------------------------------------------------------
|
|
// | fn(a: number, b: number, **c: number**): void
|
|
// | ----------------------------------------------------------------------
|
|
// fn(, ...a);
|
|
// ^
|
|
// | ----------------------------------------------------------------------
|
|
// | fn(**a: number**, b: number, c: number): void
|
|
// | ----------------------------------------------------------------------
|
|
//
|
|
// fn(...b, );
|
|
// ^
|
|
// | ----------------------------------------------------------------------
|
|
// | fn(a: number, **b: number**, c: number): void
|
|
// | ----------------------------------------------------------------------
|
|
// fn(, ...b, );
|
|
// ^
|
|
// | ----------------------------------------------------------------------
|
|
// | fn(**a: number**, b: number, c: number): void
|
|
// | ----------------------------------------------------------------------
|
|
// ^
|
|
// | ----------------------------------------------------------------------
|
|
// | fn(a: number, b: number, **c: number**): void
|
|
// | ----------------------------------------------------------------------
|
|
[
|
|
{
|
|
"marker": {
|
|
"Position": 109,
|
|
"LSPosition": {
|
|
"line": 4,
|
|
"character": 9
|
|
},
|
|
"Name": "1",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"signatures": [
|
|
{
|
|
"label": "fn(a: number, b: number, c: number): void",
|
|
"parameters": [
|
|
{
|
|
"label": "a: number"
|
|
},
|
|
{
|
|
"label": "b: number"
|
|
},
|
|
{
|
|
"label": "c: number"
|
|
}
|
|
],
|
|
"activeParameter": 2
|
|
}
|
|
],
|
|
"activeSignature": 0
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 115,
|
|
"LSPosition": {
|
|
"line": 5,
|
|
"character": 3
|
|
},
|
|
"Name": "2",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"signatures": [
|
|
{
|
|
"label": "fn(a: number, b: number, c: number): void",
|
|
"parameters": [
|
|
{
|
|
"label": "a: number"
|
|
},
|
|
{
|
|
"label": "b: number"
|
|
},
|
|
{
|
|
"label": "c: number"
|
|
}
|
|
],
|
|
"activeParameter": 0
|
|
}
|
|
],
|
|
"activeSignature": 0
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 134,
|
|
"LSPosition": {
|
|
"line": 7,
|
|
"character": 9
|
|
},
|
|
"Name": "3",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"signatures": [
|
|
{
|
|
"label": "fn(a: number, b: number, c: number): void",
|
|
"parameters": [
|
|
{
|
|
"label": "a: number"
|
|
},
|
|
{
|
|
"label": "b: number"
|
|
},
|
|
{
|
|
"label": "c: number"
|
|
}
|
|
],
|
|
"activeParameter": 1
|
|
}
|
|
],
|
|
"activeSignature": 0
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 140,
|
|
"LSPosition": {
|
|
"line": 8,
|
|
"character": 3
|
|
},
|
|
"Name": "4",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"signatures": [
|
|
{
|
|
"label": "fn(a: number, b: number, c: number): void",
|
|
"parameters": [
|
|
{
|
|
"label": "a: number"
|
|
},
|
|
{
|
|
"label": "b: number"
|
|
},
|
|
{
|
|
"label": "c: number"
|
|
}
|
|
],
|
|
"activeParameter": 0
|
|
}
|
|
],
|
|
"activeSignature": 0
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 148,
|
|
"LSPosition": {
|
|
"line": 8,
|
|
"character": 11
|
|
},
|
|
"Name": "5",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"signatures": [
|
|
{
|
|
"label": "fn(a: number, b: number, c: number): void",
|
|
"parameters": [
|
|
{
|
|
"label": "a: number"
|
|
},
|
|
{
|
|
"label": "b: number"
|
|
},
|
|
{
|
|
"label": "c: number"
|
|
}
|
|
],
|
|
"activeParameter": 2
|
|
}
|
|
],
|
|
"activeSignature": 0
|
|
}
|
|
}
|
|
] |