Last active
April 19, 2021 18:53
-
-
Save jessekelly881/151f0b1cd2b3d9f64085581395149c81 to your computer and use it in GitHub Desktop.
human-ts
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
| interface DOB { | |
| dob: Date; | |
| } | |
| const age = (dob: DOB) => 0; |
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
| interface FirstLastName { | |
| firstName: string; | |
| lastName: string; | |
| } | |
| const fullName = (flName: FirstLastName) => flName.firstName + " " + flName.lastName; | |
| const initails = (flName: FirstLastName) => flName.firstName.charAt() + flName.lastName.charAt(); |
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
| type Gender = "male" | "female" | |
| const toSymbol = (gender: Gender) => gender === "male" ? "♂" : "♀"; |
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
| type Sexuality = "heterosexual" | "homosexual" | "bisexual" | "asexual"; | |
| const toSymbol = (sex: Sexuality) => ""; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment