Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 513 Bytes

File metadata and controls

28 lines (18 loc) · 513 Bytes

Home > types-kit > SetEntry

SetEntry type

return the type of that set's entry.

Signature:

export type SetEntry<T extends ReadonlySet<unknown>> = T extends ReadonlySet<
  infer U
>
  ? [U, U]
  : never

Example

type Foo = Set<number>

// Expect: [number, number]
type EntryType = SetEntry<Foo>