Skip to content

NonFunctionKeys

Category
Get Object Keys

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

Usage

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

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

// Expect: 'name' | 'age'
type NonFunctionKeysProp = NonFunctionKeys<Prop>