mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
ee33e62c91
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: jakebailey <[email protected]>
93 lines
1.6 KiB
JSON
93 lines
1.6 KiB
JSON
// === goToDefinition ===
|
|
// === /goToDefinitionObjectLiteralProperties2.ts ===
|
|
// type C = {
|
|
// <|[|foo|]: string;|>
|
|
// bar: number;
|
|
// };
|
|
//
|
|
// declare function fn<T extends C>(arg: T): T;
|
|
//
|
|
// fn({
|
|
// foo/*GOTO DEF*/: "",
|
|
// bar: true,
|
|
// });
|
|
//
|
|
// --- (line: 13) skipped ---
|
|
|
|
|
|
|
|
// === goToDefinition ===
|
|
// === /goToDefinitionObjectLiteralProperties2.ts ===
|
|
// type C = {
|
|
// foo: string;
|
|
// <|[|bar|]: number;|>
|
|
// };
|
|
//
|
|
// declare function fn<T extends C>(arg: T): T;
|
|
//
|
|
// fn({
|
|
// foo: "",
|
|
// bar/*GOTO DEF*/: true,
|
|
// });
|
|
//
|
|
// const result = fn({
|
|
// --- (line: 14) skipped ---
|
|
|
|
|
|
|
|
// === goToDefinition ===
|
|
// === /goToDefinitionObjectLiteralProperties2.ts ===
|
|
// type C = {
|
|
// <|[|foo|]: string;|>
|
|
// bar: number;
|
|
// };
|
|
//
|
|
// --- (line: 6) skipped ---
|
|
|
|
// --- (line: 10) skipped ---
|
|
// });
|
|
//
|
|
// const result = fn({
|
|
// foo/*GOTO DEF*/: "",
|
|
// bar: 1,
|
|
// });
|
|
//
|
|
// // this one shouldn't go to the constraint type
|
|
// result.foo;
|
|
|
|
|
|
|
|
// === goToDefinition ===
|
|
// === /goToDefinitionObjectLiteralProperties2.ts ===
|
|
// type C = {
|
|
// foo: string;
|
|
// <|[|bar|]: number;|>
|
|
// };
|
|
//
|
|
// declare function fn<T extends C>(arg: T): T;
|
|
// --- (line: 7) skipped ---
|
|
|
|
// --- (line: 11) skipped ---
|
|
//
|
|
// const result = fn({
|
|
// foo: "",
|
|
// bar/*GOTO DEF*/: 1,
|
|
// });
|
|
//
|
|
// // this one shouldn't go to the constraint type
|
|
// result.foo;
|
|
|
|
|
|
|
|
// === goToDefinition ===
|
|
// === /goToDefinitionObjectLiteralProperties2.ts ===
|
|
// --- (line: 10) skipped ---
|
|
// });
|
|
//
|
|
// const result = fn({
|
|
// <|[|foo|]: ""|>,
|
|
// bar: 1,
|
|
// });
|
|
//
|
|
// // this one shouldn't go to the constraint type
|
|
// result.foo/*GOTO DEF*/; |