title: Is it possible to dynamically define a constant in Typescript?
body: <p>I am trying to find a way to dynamically define a constant in Typescript but I'am starting to thing it's not possible.</p>
  
  <p>I tried this :</p>
  
  <pre><code>  define(name: string, value: any): boolean {
      var undef;
      const name = value;
      return name == undef;
    }
  </code></pre>
  
  <p>I am supposed to call:</p>
  
  <pre><code>define ('MY_CONST_NAME', 'foo_value);
  </code></pre>
  
  <p>I get the following error : </p>
  
  <pre><code>Duplicate 'name' identifier.
  </code></pre>
  
  <p>I think it's normal but i don't know how to achieve my goal.</p>