title: How to define a new type in TypeScript
body: <p>Let say I have a variable with the following type:</p>
  
  <pre><code>let weekDay: 'Sun' | 'Mon' | 'Tue' | 'Wed' | 'Thu' | 'Fri' | 'Sat';
  </code></pre>
  
  <p>And in different places in my project I'm using this type, so each time I write:</p>
  
  <pre><code>function setDay(day: 'Sun' | 'Mon' | 'Tue' | 'Wed' | 'Thu' | 'Fri' | 'Sat') { ... }
  function getDay(): 'Sun' | 'Mon' | 'Tue' | 'Wed' | 'Thu' | 'Fri' | 'Sat' { ... }
  </code></pre>
  
  <p>How can I define this new type once, so I will not need to write it each time. I try to define an <code>interface</code> but it will create an object-type with this type as one of each attributes, but this <strong>isn't</strong> what I want</p>
  
  <pre><code>interface iWeekDay {
    day: 'Sun' | 'Mon' | 'Tue' | 'Wed' | 'Thu' | 'Fri' | 'Sat';
  }
  </code></pre>