to update
to chose fields
to update with
import {A, O} from 'ts-toolbelt'
type User = {
info: {
name: string
age: number
payment: {}
}
id: number
}
type test0 = Update<User, 'id' | 'info', A.x | null>
// {
// info: {
// name: string;
// age: number;
// payment: {};
// } | null;
// id: number | null;
// }
Update in
O
the fields of keyK
withA
. Use the x placeholder to get the current field type.