Skip to content

Instantly share code, notes, and snippets.

@bicknest
Created October 16, 2019 00:58
Show Gist options
  • Save bicknest/c768e250435fee6b081bf9da3224c056 to your computer and use it in GitHub Desktop.
Save bicknest/c768e250435fee6b081bf9da3224c056 to your computer and use it in GitHub Desktop.
Opaque Typing #1
opaque type MediumDate: string = string;
utils.formatMediumDate = (d: DayJSable): MediumDate => {
dayjs(d).format('DD-MM-YYY');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment