title: TypeScript compile-time constants?
body: <p>I'm writing a library in TypeScript and I want to target both Node and Browser. Right now I'm running <code>tsc</code> twice with two different targets. That part is working OK.</p>
  
  <p>However, a tiny portion of my code is target-specific. I need to be able to do something like:</p>
  
  <pre><code>if(BUILD_TARGET === 'node') {
      // do something
  } else {
      // do something else
  }
  </code></pre>
  
  <p>Is there any way I can inject these constants at compile-time so that they can either be optimized away by <code>tsc</code> itself, or via a pass through UglifyJS (or some such tool)?</p>