Skip to content

Instantly share code, notes, and snippets.

@carlrip
Created December 17, 2019 18:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlrip/a85a1af7f92e7d0186b7379c9a8a8795 to your computer and use it in GitHub Desktop.
Save carlrip/a85a1af7f92e7d0186b7379c9a8a8795 to your computer and use it in GitHub Desktop.
const assertions - literals
const Status = {
Loading: "LOADING",
Loaded: "LOADED",
} as const ;
logStatus(Status.Loading); // Type is "LOADING"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment