File: goToTypeDefinition_promiseType.baseline.jsonc

package info (click to toggle)
node-typescript 5.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 497,488 kB
  • sloc: javascript: 2,107,274; makefile: 6; sh: 1
file content (119 lines) | stat: -rw-r--r-- 4,108 bytes parent folder | download
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
// === goToType ===
// === /tests/cases/fourslash/goToTypeDefinition_promiseType.ts ===
// type User = [|{| defId: 0 |}{ name: string }|];
// async function /*GOTO TYPE*/getUser() { return { name: "Bob" } satisfies User as User }
// 
// const promisedBob = getUser() 
// 
// export {}

// === lib.d.ts ===
// --- (line: --) skipped ---
// /**
//  * Represents the completion of an asynchronous operation
//  */
// <|interface [|{| defId: 1 |}Promise|]<T> {
//     /**
//      * Attaches callbacks for the resolution and/or rejection of the Promise.
//      * @param onfulfilled The callback to execute when the Promise is resolved.
//      * @param onrejected The callback to execute when the Promise is rejected.
//      * @returns A Promise for the completion of which ever callback is executed.
//      */
//     then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
// 
//     /**
//      * Attaches a callback for only the rejection of the Promise.
//      * @param onrejected The callback to execute when the Promise is rejected.
//      * @returns A Promise for the completion of the callback.
//      */
//     catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
// }|>
// 
// /**
//  * Recursively unwraps the "awaited type" of a type. Non-promise "thenables" should resolve to `never`. This emulates the behavior of `await`.
// --- (line: --) skipped ---

  // === Details ===
  [
   {
    "defId": 0,
    "kind": "",
    "name": "__type",
    "containerName": "",
    "isLocal": true,
    "isAmbient": false,
    "unverified": false,
    "failedAliasResolution": false
   },
   {
    "defId": 1,
    "kind": "interface",
    "name": "Promise",
    "containerName": "",
    "isLocal": false,
    "isAmbient": true,
    "unverified": false,
    "failedAliasResolution": false
   }
  ]



// === goToType ===
// === /tests/cases/fourslash/goToTypeDefinition_promiseType.ts ===
// type User = [|{| defId: 0 |}{ name: string }|];
// async function getUser() { return { name: "Bob" } satisfies User as User }
// 
// const /*GOTO TYPE*/promisedBob = getUser() 
// 
// export {}

// === lib.d.ts ===
// --- (line: --) skipped ---
// /**
//  * Represents the completion of an asynchronous operation
//  */
// <|interface [|{| defId: 1 |}Promise|]<T> {
//     /**
//      * Attaches callbacks for the resolution and/or rejection of the Promise.
//      * @param onfulfilled The callback to execute when the Promise is resolved.
//      * @param onrejected The callback to execute when the Promise is rejected.
//      * @returns A Promise for the completion of which ever callback is executed.
//      */
//     then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
// 
//     /**
//      * Attaches a callback for only the rejection of the Promise.
//      * @param onrejected The callback to execute when the Promise is rejected.
//      * @returns A Promise for the completion of the callback.
//      */
//     catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
// }|>
// 
// /**
//  * Recursively unwraps the "awaited type" of a type. Non-promise "thenables" should resolve to `never`. This emulates the behavior of `await`.
// --- (line: --) skipped ---

  // === Details ===
  [
   {
    "defId": 0,
    "kind": "",
    "name": "__type",
    "containerName": "",
    "isLocal": true,
    "isAmbient": false,
    "unverified": false,
    "failedAliasResolution": false
   },
   {
    "defId": 1,
    "kind": "interface",
    "name": "Promise",
    "containerName": "",
    "isLocal": false,
    "isAmbient": true,
    "unverified": false,
    "failedAliasResolution": false
   }
  ]