Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 433 Bytes

pick-by-required.md

File metadata and controls

24 lines (17 loc) · 433 Bytes
category alias
Generate Object
GetRequired

PickByRequired

From T pick all required properties to generate a new object type.

Usage

import type { PickByRequired } from '@utype/core'

type Props = {
  foo: number;
  bar?: string;
}

// Expect: { foo: number; } // [!code highlight]
type PickByRequiredProps = PickByRequired<Props>