Preview:```ts
// assume more properties than these...
interface A {
a: string
}
interface B {
b: number
}
type X = A & B
function update<K extends keyof X>(key: K, value: X[K]) {
// If key is part of 'A'
//...
// Else if key is part of 'B'
//...
...```
You can choose specific lines to embed by selecting them before copying the link.