Skip to content

EntryOf

Transform an object type into a union of its entries.

import { EntryOf } from 'crustack/types'
type MyObject = {
a: number
b: string
}
type Entry = EntryOf<MyObject>
// ['a', number] | ['b', string]