mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
150 lines
3.0 KiB
JSON
150 lines
3.0 KiB
JSON
// === findAllReferences ===
|
|
// === /findAllRefsUnionProperty.ts ===
|
|
// type T =
|
|
// | { /*FIND ALL REFS*/[|type|]: "a", prop: number }
|
|
// | { [|type|]: "b", prop: string };
|
|
// const tt: T = {
|
|
// [|type|]: "a",
|
|
// prop: 0,
|
|
// };
|
|
// declare const t: T;
|
|
// if (t.[|type|] === "a") {
|
|
// t.[|type|];
|
|
// } else {
|
|
// t.[|type|];
|
|
// }
|
|
|
|
|
|
|
|
// === findAllReferences ===
|
|
// === /findAllRefsUnionProperty.ts ===
|
|
// type T =
|
|
// | { [|type|]: "a", prop: number }
|
|
// | { /*FIND ALL REFS*/[|type|]: "b", prop: string };
|
|
// const tt: T = {
|
|
// [|type|]: "a",
|
|
// prop: 0,
|
|
// };
|
|
// declare const t: T;
|
|
// if (t.[|type|] === "a") {
|
|
// t.[|type|];
|
|
// } else {
|
|
// t.[|type|];
|
|
// }
|
|
|
|
|
|
|
|
// === findAllReferences ===
|
|
// === /findAllRefsUnionProperty.ts ===
|
|
// type T =
|
|
// | { [|type|]: "a", prop: number }
|
|
// | { [|type|]: "b", prop: string };
|
|
// const tt: T = {
|
|
// [|type|]: "a",
|
|
// prop: 0,
|
|
// };
|
|
// declare const t: T;
|
|
// if (t./*FIND ALL REFS*/[|type|] === "a") {
|
|
// t.[|type|];
|
|
// } else {
|
|
// t.[|type|];
|
|
// }
|
|
|
|
|
|
|
|
// === findAllReferences ===
|
|
// === /findAllRefsUnionProperty.ts ===
|
|
// type T =
|
|
// | { [|type|]: "a", prop: number }
|
|
// | { [|type|]: "b", prop: string };
|
|
// const tt: T = {
|
|
// [|type|]: "a",
|
|
// prop: 0,
|
|
// };
|
|
// declare const t: T;
|
|
// if (t.[|type|] === "a") {
|
|
// t./*FIND ALL REFS*/[|type|];
|
|
// } else {
|
|
// t.[|type|];
|
|
// }
|
|
|
|
|
|
|
|
// === findAllReferences ===
|
|
// === /findAllRefsUnionProperty.ts ===
|
|
// type T =
|
|
// | { [|type|]: "a", prop: number }
|
|
// | { [|type|]: "b", prop: string };
|
|
// const tt: T = {
|
|
// [|type|]: "a",
|
|
// prop: 0,
|
|
// };
|
|
// declare const t: T;
|
|
// if (t.[|type|] === "a") {
|
|
// t.[|type|];
|
|
// } else {
|
|
// t./*FIND ALL REFS*/[|type|];
|
|
// }
|
|
|
|
|
|
|
|
// === findAllReferences ===
|
|
// === /findAllRefsUnionProperty.ts ===
|
|
// type T =
|
|
// | { [|type|]: "a", prop: number }
|
|
// | { type: "b", prop: string };
|
|
// const tt: T = {
|
|
// /*FIND ALL REFS*/[|type|]: "a",
|
|
// prop: 0,
|
|
// };
|
|
// declare const t: T;
|
|
// if (t.[|type|] === "a") {
|
|
// t.[|type|];
|
|
// } else {
|
|
// t.type;
|
|
// }
|
|
|
|
|
|
|
|
// === findAllReferences ===
|
|
// === /findAllRefsUnionProperty.ts ===
|
|
// type T =
|
|
// | { type: "a", /*FIND ALL REFS*/[|prop|]: number }
|
|
// | { type: "b", [|prop|]: string };
|
|
// const tt: T = {
|
|
// type: "a",
|
|
// [|prop|]: 0,
|
|
// };
|
|
// declare const t: T;
|
|
// if (t.type === "a") {
|
|
// --- (line: 10) skipped ---
|
|
|
|
|
|
|
|
// === findAllReferences ===
|
|
// === /findAllRefsUnionProperty.ts ===
|
|
// type T =
|
|
// | { type: "a", [|prop|]: number }
|
|
// | { type: "b", /*FIND ALL REFS*/[|prop|]: string };
|
|
// const tt: T = {
|
|
// type: "a",
|
|
// [|prop|]: 0,
|
|
// };
|
|
// declare const t: T;
|
|
// if (t.type === "a") {
|
|
// --- (line: 10) skipped ---
|
|
|
|
|
|
|
|
// === findAllReferences ===
|
|
// === /findAllRefsUnionProperty.ts ===
|
|
// type T =
|
|
// | { type: "a", [|prop|]: number }
|
|
// | { type: "b", prop: string };
|
|
// const tt: T = {
|
|
// type: "a",
|
|
// /*FIND ALL REFS*/[|prop|]: 0,
|
|
// };
|
|
// declare const t: T;
|
|
// if (t.type === "a") {
|
|
// --- (line: 10) skipped --- |