mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
e0069505b9
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: jakebailey <[email protected]>
570 lines
13 KiB
Plaintext
570 lines
13 KiB
Plaintext
// === QuickInfo ===
|
|
=== /quickInfoDisplayPartsLocalFunction.ts ===
|
|
// function outerFoo() {
|
|
// ^^^^^^^^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | function outerFoo(): void
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// function foo(param: string, optionalParam?: string, paramWithInitializer = "hello", ...restParam: string[]) {
|
|
// ^^^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | function foo(param: string, optionalParam?: string, paramWithInitializer?: string, ...restParam: string[]): void
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// }
|
|
// function foowithoverload(a: string): string;
|
|
// ^^^^^^^^^^^^^^^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | function foowithoverload(a: string): string
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// function foowithoverload(a: number): number;
|
|
// ^^^^^^^^^^^^^^^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | function foowithoverload(a: number): number
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// function foowithoverload(a: any): any {
|
|
// ^^^^^^^^^^^^^^^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | function foowithoverload(a: any): any
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// return a;
|
|
// }
|
|
// function foowith3overload(a: string): string;
|
|
// ^^^^^^^^^^^^^^^^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | function foowith3overload(a: string): string
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// function foowith3overload(a: number): number;
|
|
// ^^^^^^^^^^^^^^^^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | function foowith3overload(a: number): number
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// function foowith3overload(a: boolean): boolean;
|
|
// ^^^^^^^^^^^^^^^^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | function foowith3overload(a: boolean): boolean
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// function foowith3overload(a: any): any {
|
|
// ^^^^^^^^^^^^^^^^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | function foowith3overload(a: any): any
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// return a;
|
|
// }
|
|
// foo("hello");
|
|
// ^^^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | function foo(param: string, optionalParam?: string, paramWithInitializer?: string, ...restParam: string[]): void
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// foowithoverload("hello");
|
|
// ^^^^^^^^^^^^^^^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | function foowithoverload(a: string): string
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// foowithoverload(10);
|
|
// ^^^^^^^^^^^^^^^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | function foowithoverload(a: number): number
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// foowith3overload("hello");
|
|
// ^^^^^^^^^^^^^^^^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | function foowith3overload(a: string): string
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// foowith3overload(10);
|
|
// ^^^^^^^^^^^^^^^^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | function foowith3overload(a: number): number
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// foowith3overload(true);
|
|
// ^^^^^^^^^^^^^^^^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | function foowith3overload(a: boolean): boolean
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// }
|
|
// outerFoo();
|
|
// ^^^^^^^^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | function outerFoo(): void
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
[
|
|
{
|
|
"marker": {
|
|
"Position": 9,
|
|
"LSPosition": {
|
|
"line": 0,
|
|
"character": 9
|
|
},
|
|
"Name": "1",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nfunction outerFoo(): void\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 0,
|
|
"character": 9
|
|
},
|
|
"end": {
|
|
"line": 0,
|
|
"character": 17
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 35,
|
|
"LSPosition": {
|
|
"line": 1,
|
|
"character": 13
|
|
},
|
|
"Name": "2",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nfunction foo(param: string, optionalParam?: string, paramWithInitializer?: string, ...restParam: string[]): void\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 1,
|
|
"character": 13
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"character": 16
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 155,
|
|
"LSPosition": {
|
|
"line": 3,
|
|
"character": 13
|
|
},
|
|
"Name": "3",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nfunction foowithoverload(a: string): string\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 3,
|
|
"character": 13
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"character": 28
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 204,
|
|
"LSPosition": {
|
|
"line": 4,
|
|
"character": 13
|
|
},
|
|
"Name": "4",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nfunction foowithoverload(a: number): number\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 4,
|
|
"character": 13
|
|
},
|
|
"end": {
|
|
"line": 4,
|
|
"character": 28
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 253,
|
|
"LSPosition": {
|
|
"line": 5,
|
|
"character": 13
|
|
},
|
|
"Name": "5",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nfunction foowithoverload(a: any): any\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 5,
|
|
"character": 13
|
|
},
|
|
"end": {
|
|
"line": 5,
|
|
"character": 28
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 321,
|
|
"LSPosition": {
|
|
"line": 8,
|
|
"character": 13
|
|
},
|
|
"Name": "6",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nfunction foowith3overload(a: string): string\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 8,
|
|
"character": 13
|
|
},
|
|
"end": {
|
|
"line": 8,
|
|
"character": 29
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 371,
|
|
"LSPosition": {
|
|
"line": 9,
|
|
"character": 13
|
|
},
|
|
"Name": "7",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nfunction foowith3overload(a: number): number\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 9,
|
|
"character": 13
|
|
},
|
|
"end": {
|
|
"line": 9,
|
|
"character": 29
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 421,
|
|
"LSPosition": {
|
|
"line": 10,
|
|
"character": 13
|
|
},
|
|
"Name": "8",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nfunction foowith3overload(a: boolean): boolean\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 10,
|
|
"character": 13
|
|
},
|
|
"end": {
|
|
"line": 10,
|
|
"character": 29
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 473,
|
|
"LSPosition": {
|
|
"line": 11,
|
|
"character": 13
|
|
},
|
|
"Name": "9",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nfunction foowith3overload(a: any): any\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 11,
|
|
"character": 13
|
|
},
|
|
"end": {
|
|
"line": 11,
|
|
"character": 29
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 533,
|
|
"LSPosition": {
|
|
"line": 14,
|
|
"character": 4
|
|
},
|
|
"Name": "10",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nfunction foo(param: string, optionalParam?: string, paramWithInitializer?: string, ...restParam: string[]): void\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 14,
|
|
"character": 4
|
|
},
|
|
"end": {
|
|
"line": 14,
|
|
"character": 7
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 551,
|
|
"LSPosition": {
|
|
"line": 15,
|
|
"character": 4
|
|
},
|
|
"Name": "11",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nfunction foowithoverload(a: string): string\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 15,
|
|
"character": 4
|
|
},
|
|
"end": {
|
|
"line": 15,
|
|
"character": 19
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 581,
|
|
"LSPosition": {
|
|
"line": 16,
|
|
"character": 4
|
|
},
|
|
"Name": "12",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nfunction foowithoverload(a: number): number\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 16,
|
|
"character": 4
|
|
},
|
|
"end": {
|
|
"line": 16,
|
|
"character": 19
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 606,
|
|
"LSPosition": {
|
|
"line": 17,
|
|
"character": 4
|
|
},
|
|
"Name": "13",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nfunction foowith3overload(a: string): string\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 17,
|
|
"character": 4
|
|
},
|
|
"end": {
|
|
"line": 17,
|
|
"character": 20
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 637,
|
|
"LSPosition": {
|
|
"line": 18,
|
|
"character": 4
|
|
},
|
|
"Name": "14",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nfunction foowith3overload(a: number): number\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 18,
|
|
"character": 4
|
|
},
|
|
"end": {
|
|
"line": 18,
|
|
"character": 20
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 663,
|
|
"LSPosition": {
|
|
"line": 19,
|
|
"character": 4
|
|
},
|
|
"Name": "15",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nfunction foowith3overload(a: boolean): boolean\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 19,
|
|
"character": 4
|
|
},
|
|
"end": {
|
|
"line": 19,
|
|
"character": 20
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 689,
|
|
"LSPosition": {
|
|
"line": 21,
|
|
"character": 0
|
|
},
|
|
"Name": "16",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nfunction outerFoo(): void\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 21,
|
|
"character": 0
|
|
},
|
|
"end": {
|
|
"line": 21,
|
|
"character": 8
|
|
}
|
|
}
|
|
}
|
|
}
|
|
] |