Skip to content

Instantly share code, notes, and snippets.

@jessekelly881
Last active April 19, 2021 18:53
Show Gist options
  • Select an option

  • Save jessekelly881/151f0b1cd2b3d9f64085581395149c81 to your computer and use it in GitHub Desktop.

Select an option

Save jessekelly881/151f0b1cd2b3d9f64085581395149c81 to your computer and use it in GitHub Desktop.
human-ts
interface DOB {
dob: Date;
}
const age = (dob: DOB) => 0;
interface FirstLastName {
firstName: string;
lastName: string;
}
const fullName = (flName: FirstLastName) => flName.firstName + " " + flName.lastName;
const initails = (flName: FirstLastName) => flName.firstName.charAt() + flName.lastName.charAt();
type Gender = "male" | "female"
const toSymbol = (gender: Gender) => gender === "male" ? "♂" : "♀";
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