Preview:```ts
function update<T extends Record<string, number>>(
data: T,
key: keyof T
): T {
if (typeof data[key] === "number") {
data[key] += 1
}
return data
}
update({a: 2}, "a")```
You can choose specific lines to embed by selecting them before copying the link.