5 ms·
Here’s a neat trick for those complex types: type Identity<T> = T // This can be made recursive to an extent, alas I’m on mobile type Merge<T> = { [
by eyelidlessness 3y ago
Here’s a neat trick for those complex types:
type Identity<T> = T
// This can be made recursive to an extent, alas I’m on mobile
type Merge<T> = {
[K in keyof T]: Identity<T[K]>
}
type ReadableFoo = Merge<UnreadableFoo>