Skip to content

FunctionKeys

Category
Get Object Keys

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

Usage

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

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

// Expect: 'setName' | 'getName'
type FunctionKeysProp = FunctionKeys<Prop>