import type { Data } from "./05data"; // Parsing type Pair = { left: A, right: B }; type List = ListNil | ListCons; type ListNil = { type: "list_nil" }; type ListCons = { type: "list_cons", head: H, tail: T }; type Parse = T extends `${infer Crates}\n\n${infer Instrs}` ? Pair: never; type SplitBy = T extends `${infer Head}${infer Sep}${infer Tail}` ? {} : { type: "cons", head: T, tail: { type: "nil" } }; type DataSplit = Parse;