Skip to content

Instantly share code, notes, and snippets.

@przemyslawjanpietrzak
Created October 31, 2021 20:30
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 przemyslawjanpietrzak/f71c2c6eabf36ed41660ca493c4d6f18 to your computer and use it in GitHub Desktop.
Save przemyslawjanpietrzak/f71c2c6eabf36ed41660ca493c4d6f18 to your computer and use it in GitHub Desktop.
literal-types-vuex
type Color = "red" | "blue";
type Quantity = "one" | "two";
type SeussFish = `${Quantity | Color} fish`;
// same as
// type SeussFish = "one fish" | "two fish"
// | "red fish" | "blue fish";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment