const a = ['a', 'b'] as const
const b: typeof a[number] = 'a'
type DeepPartial<T> = {
[P in keyof T]?: T[P] extends Array<infer I>
? Array<DeepPartial<I>>
: DeepPartial<T[P]>
}
type Unpack<T extends (...args: any[]) => void> = Extract<Awaited<ReturnType<T>>, [unknown, null]>[0]