TypeScript check for empty string : <p>Is there a way for TypeScript to statically check for an empty string? Is there a way to statically require a non-empty string to be passed to a function?</p>

<pre><code>let fn = function(a:string){

};

fn('');
</code></pre>

<p>or</p>

<pre><code>let a = '';
fn(a);
</code></pre>

<p>Can TS help us here?</p>
