Last active
September 14, 2020 07:28
-
-
Save mtimbs/2ae3908979450ded84c67d6d4a5bad6e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hasOwnProperty<X extends {}, Y extends PropertyKey>(obj: X, prop: Y): obj is X & Record<Y, unknown> { | |
return Object.hasOwnProperty.call(obj, prop) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment