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
|
// === goToType ===
// === /tests/cases/fourslash/goToTypeDefinition_Pick.ts ===
// type User = [|{| defId: 0 |}{ id: number; name: string; }|];
// declare const user: Pick<User, "name">
// /*GOTO TYPE*/user
//
// type PickedUser = Pick<User, "name">
// declare const user2: PickedUser
// user2
// === lib.d.ts ===
// --- (line: --) skipped ---
// /**
// * From T, pick a set of properties whose keys are in the union K
// */
// type Pick<T, K extends keyof T> = [|{| defId: 1 |}{
// [P in K]: T[P];
// }|];
//
// /**
// * Construct a type with a set of properties K of type T
// --- (line: --) skipped ---
// === Details ===
[
{
"defId": 0,
"kind": "",
"name": "__type",
"containerName": "",
"isLocal": false,
"isAmbient": false,
"unverified": false,
"failedAliasResolution": false
},
{
"defId": 1,
"kind": "",
"name": "__type",
"containerName": "",
"isLocal": true,
"isAmbient": true,
"unverified": false,
"failedAliasResolution": false
}
]
// === goToType ===
// === /tests/cases/fourslash/goToTypeDefinition_Pick.ts ===
// type User = [|{| defId: 0 |}{ id: number; name: string; }|];
// declare const user: Pick<User, "name">
// user
//
// type PickedUser = Pick<User, "name">
// declare const user2: PickedUser
// /*GOTO TYPE*/user2
// === lib.d.ts ===
// --- (line: --) skipped ---
// /**
// * From T, pick a set of properties whose keys are in the union K
// */
// type Pick<T, K extends keyof T> = [|{| defId: 1 |}{
// [P in K]: T[P];
// }|];
//
// /**
// * Construct a type with a set of properties K of type T
// --- (line: --) skipped ---
// === Details ===
[
{
"defId": 0,
"kind": "",
"name": "__type",
"containerName": "",
"isLocal": false,
"isAmbient": false,
"unverified": false,
"failedAliasResolution": false
},
{
"defId": 1,
"kind": "",
"name": "__type",
"containerName": "",
"isLocal": true,
"isAmbient": true,
"unverified": false,
"failedAliasResolution": false
}
]
|