Preview:```ts
import {match, P} from "ts-pattern"
type A = "foo" | "bar"
type Args<T extends A> = T extends "foo"
? {hello: "world"}
: {baz: "quz"}
type Tuple<T extends A> = [key: T, args: Args<T>]
function makeTest<T extends A>(...options: Tuple<T>) {
match(options).with(["foo", P.any], ()
...```
You can choose specific lines to embed by selecting them before copying the link.