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]>
578 lines
12 KiB
Plaintext
578 lines
12 KiB
Plaintext
// === QuickInfo ===
|
|
=== /quickInfoDisplayPartsLet.ts ===
|
|
// let a = 10;
|
|
// ^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | let a: number
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// function foo() {
|
|
// let b = a;
|
|
// ^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | let b: number
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// ^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | let a: number
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// if (b) {
|
|
// let b1 = 10;
|
|
// ^^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | let b1: number
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// }
|
|
// }
|
|
// namespace m {
|
|
// let c = 10;
|
|
// ^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | let c: number
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// export let d = 10;
|
|
// ^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | let d: number
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// if (c) {
|
|
// let e = 10;
|
|
// ^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | let e: number
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// }
|
|
// }
|
|
// let f: () => number;
|
|
// ^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | let f: () => number
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// let g = f;
|
|
// ^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | let g: () => number
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// ^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | let f: () => number
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// f();
|
|
// ^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | let f: () => number
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// let h: { (a: string): number; (a: number): string; };
|
|
// ^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | let h: {
|
|
// | (a: string): number;
|
|
// | (a: number): string;
|
|
// | }
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// let i = h;
|
|
// ^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | let i: {
|
|
// | (a: string): number;
|
|
// | (a: number): string;
|
|
// | }
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// ^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | let h: {
|
|
// | (a: string): number;
|
|
// | (a: number): string;
|
|
// | }
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// h(10);
|
|
// ^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | let h: (a: number) => string
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
// h("hello");
|
|
// ^
|
|
// | ----------------------------------------------------------------------
|
|
// | ```typescript
|
|
// | let h: (a: string) => number
|
|
// | ```
|
|
// |
|
|
// | ----------------------------------------------------------------------
|
|
[
|
|
{
|
|
"marker": {
|
|
"Position": 4,
|
|
"LSPosition": {
|
|
"line": 0,
|
|
"character": 4
|
|
},
|
|
"Name": "1",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nlet a: number\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 0,
|
|
"character": 4
|
|
},
|
|
"end": {
|
|
"line": 0,
|
|
"character": 5
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 37,
|
|
"LSPosition": {
|
|
"line": 2,
|
|
"character": 8
|
|
},
|
|
"Name": "2",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nlet b: number\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 2,
|
|
"character": 8
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"character": 9
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 41,
|
|
"LSPosition": {
|
|
"line": 2,
|
|
"character": 12
|
|
},
|
|
"Name": "3",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nlet a: number\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 2,
|
|
"character": 12
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"character": 13
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 69,
|
|
"LSPosition": {
|
|
"line": 4,
|
|
"character": 12
|
|
},
|
|
"Name": "4",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nlet b1: number\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 4,
|
|
"character": 12
|
|
},
|
|
"end": {
|
|
"line": 4,
|
|
"character": 14
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 108,
|
|
"LSPosition": {
|
|
"line": 8,
|
|
"character": 8
|
|
},
|
|
"Name": "5",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nlet c: number\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 8,
|
|
"character": 8
|
|
},
|
|
"end": {
|
|
"line": 8,
|
|
"character": 9
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 131,
|
|
"LSPosition": {
|
|
"line": 9,
|
|
"character": 15
|
|
},
|
|
"Name": "6",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nlet d: number\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 9,
|
|
"character": 15
|
|
},
|
|
"end": {
|
|
"line": 9,
|
|
"character": 16
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 164,
|
|
"LSPosition": {
|
|
"line": 11,
|
|
"character": 12
|
|
},
|
|
"Name": "7",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nlet e: number\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 11,
|
|
"character": 12
|
|
},
|
|
"end": {
|
|
"line": 11,
|
|
"character": 13
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 184,
|
|
"LSPosition": {
|
|
"line": 14,
|
|
"character": 4
|
|
},
|
|
"Name": "8",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nlet f: () => number\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 14,
|
|
"character": 4
|
|
},
|
|
"end": {
|
|
"line": 14,
|
|
"character": 5
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 205,
|
|
"LSPosition": {
|
|
"line": 15,
|
|
"character": 4
|
|
},
|
|
"Name": "9",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nlet g: () => number\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 15,
|
|
"character": 4
|
|
},
|
|
"end": {
|
|
"line": 15,
|
|
"character": 5
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 209,
|
|
"LSPosition": {
|
|
"line": 15,
|
|
"character": 8
|
|
},
|
|
"Name": "10",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nlet f: () => number\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 15,
|
|
"character": 8
|
|
},
|
|
"end": {
|
|
"line": 15,
|
|
"character": 9
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 212,
|
|
"LSPosition": {
|
|
"line": 16,
|
|
"character": 0
|
|
},
|
|
"Name": "11",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nlet f: () => number\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 16,
|
|
"character": 0
|
|
},
|
|
"end": {
|
|
"line": 16,
|
|
"character": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 221,
|
|
"LSPosition": {
|
|
"line": 17,
|
|
"character": 4
|
|
},
|
|
"Name": "12",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nlet h: {\n (a: string): number;\n (a: number): string;\n}\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 17,
|
|
"character": 4
|
|
},
|
|
"end": {
|
|
"line": 17,
|
|
"character": 5
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 275,
|
|
"LSPosition": {
|
|
"line": 18,
|
|
"character": 4
|
|
},
|
|
"Name": "13",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nlet i: {\n (a: string): number;\n (a: number): string;\n}\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 18,
|
|
"character": 4
|
|
},
|
|
"end": {
|
|
"line": 18,
|
|
"character": 5
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 279,
|
|
"LSPosition": {
|
|
"line": 18,
|
|
"character": 8
|
|
},
|
|
"Name": "14",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nlet h: {\n (a: string): number;\n (a: number): string;\n}\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 18,
|
|
"character": 8
|
|
},
|
|
"end": {
|
|
"line": 18,
|
|
"character": 9
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 282,
|
|
"LSPosition": {
|
|
"line": 19,
|
|
"character": 0
|
|
},
|
|
"Name": "15",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nlet h: (a: number) => string\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 19,
|
|
"character": 0
|
|
},
|
|
"end": {
|
|
"line": 19,
|
|
"character": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"Position": 289,
|
|
"LSPosition": {
|
|
"line": 20,
|
|
"character": 0
|
|
},
|
|
"Name": "16",
|
|
"Data": {}
|
|
},
|
|
"item": {
|
|
"contents": {
|
|
"kind": "markdown",
|
|
"value": "```typescript\nlet h: (a: string) => number\n```\n"
|
|
},
|
|
"range": {
|
|
"start": {
|
|
"line": 20,
|
|
"character": 0
|
|
},
|
|
"end": {
|
|
"line": 20,
|
|
"character": 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
] |