Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 423 Bytes

non-function-keys.md

File metadata and controls

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

NonFunctionKeys

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

Usage

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

type Props = {
  name: string;
  age: number;
  setName: (name: string) => void;
}

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