Skip to content

Instantly share code, notes, and snippets.

@deleteman
Created September 18, 2020 04:57
Show Gist options
  • Save deleteman/2a93ccdc718b2ae4c97ff360e3b54a94 to your computer and use it in GitHub Desktop.
Save deleteman/2a93ccdc718b2ae4c97ff360e3b54a94 to your computer and use it in GitHub Desktop.
function get<T, K extends keyof T>(p: T, key: K): any {
return p[key]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment