Last active
January 17, 2020 17:16
-
-
Save meekg33k/f0abcf17f4753173ef63bf926d3f15ff to your computer and use it in GitHub Desktop.
Identity function for different types https://medium.com/p/177b4a654ef6
This file contains hidden or 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
const identityStringFn = (arg: string): string => arg; | |
const identityNumberFn = (arg: number): number => arg; | |
const identityBooleanFn = (arg: boolean): boolean => arg; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment