Preview:```ts
function test<P extends number>(
...array: [P, (param: P) => any][]
) {
array.forEach(([p, fn]) => fn(p))
}
test(
[
1,
param => {
// let ts know param = 1
},
],
[
2,
param => {
// let ts know param = 2
},
]
)```
You can choose specific lines to embed by selecting them before copying the link.