title: Typescript: is it ok to use enum as function parameter type?
body: <p>Simple question, yet I have a doubt and couldn't find the answer.</p>
  
  <p>Suppose you have this enum:</p>
  
  <pre><code>export enum fooEnum {
      Foo = 'foo',
      Bar = 'bar'
  }
  </code></pre>
  
  <p>Then would it be ok to type my function parameters this way? Meaning 'I expect to receive a string 'foo' or 'bar' as parameter and expect to return 'foo' or 'bar'</p>
  
  <pre><code>function doStuff(myParam: FooEnum): FooEnum {
      return myParam;
  };
  </code></pre>