Skip to content

Instantly share code, notes, and snippets.

@kanian
Created August 24, 2020 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kanian/ffd4c1f4f7ae48dade3b60ea2d32846e to your computer and use it in GitHub Desktop.
Save kanian/ffd4c1f4f7ae48dade3b60ea2d32846e to your computer and use it in GitHub Desktop.
Extract get the non function keys of an instance
import { NonFunctionKeys } from "utility-types"
export type OnlyProperties<T extends object> = { [P in NonFunctionKeys<T>]: T[P] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment