Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 412 Bytes

non-object-keys.md

File metadata and controls

24 lines (17 loc) · 412 Bytes
category
Get Object Keys

NonObjectKeys

Get union type of keys that are non-object in object type T.

Usage

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

type Props = {
  name: string;
  age: number;
  breakfast: { foods: string[]; };
}

// Expect: 'name' | 'age' // [!code highlight]
type NonObjectKeysProps = NonObjectKeys<Props>