Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 392 Bytes

omit-never.md

File metadata and controls

24 lines (17 loc) · 392 Bytes
category
Basic Operation

OmitNever

Get Union type of object property types, but filtered out never types.

Usage

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

type Props = {
  name: string;
  age: never;
  visible: boolean;
}

// Expect: string | boolean // [!code highlight]
type OmitNeverProps = OmitNever<Props>