title: How can I have a property that can be an array of strings or a function that returns an array of strings?
body: <p>I have an interface like:</p>
  <pre><code>interface ListColumn {
    filters: Array&lt;string | string[]&gt; | (arg0: any) =&gt; string[],
    ...
  </code></pre>
  <p>And then I have code which does:</p>
  <pre><code>class Helpers {
    static isFunction (arg: any) {
      return arg &amp;&amp; typeof arg === 'function';
    }
  }
  </code></pre>
  <p>...</p>
  <pre><code>if (Helpers.isFunction(obj.filters)) { obj.filters = obj.filters(config.screenWidth); }
  </code></pre>
  <p>and I get: Not all constituents of type '(string | string[])[] | ((arg0: any) =&gt; string[])' are callable. Type '(string | string[])[]' has no call signatures.</p>
  <p>I seem to only be able to get around this by declaring filters as <code>any</code> or performing casting such as:</p>
  <pre><code>if (Helpers.isFunction(obj.filters)) { obj.filters = (column.filters as (arg0: any) =&gt; string[]) (config.screenWidth);
  </code></pre>
  <p>Is there a better way to get around this?</p>