<p dir="auto">Hello,</p>
<p dir="auto">I'm dealing with an issue specific to TypeScript on a Backbone project, but this seems more generic to any project using underscore/lodash and the return of the <code class="notranslate">_.result</code> method:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// With _.result you can work with an object property or function...
return _.isFunction(value) ? value.call(object) : value;"><pre class="notranslate"><code class="notranslate">// With _.result you can work with an object property or function...
return _.isFunction(value) ? value.call(object) : value;
</code></pre></div>
<p dir="auto">Is it possible to have a TypeScript interface definition that includes an instance property that can optionally be overridden with an instance method?  Example from Backbone's .d.ts file to include both:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="url: any
url(): any"><pre class="notranslate"><code class="notranslate">url: any
url(): any
</code></pre></div>
<p dir="auto">Currently this produces an error for a duplicate identifier.</p>
<p dir="auto">Thanks!<br>
-Eric</p>
<p dir="auto">Wondering if something like the "_ViewStart" for MVC could be added to TS...</p>
<p dir="auto">If a directory has 5 files and each of them share a common set of ES6 import...from statements then creating a file (preferably not called _ViewStart) could be created at the parent directory and this will ensure each class has all of those scopes included for intellisense and they can be injected during compilation.</p>
<p dir="auto">nice to have would be to be able to nest these so that following a directory structure will result in all of the usings at the deepest level flattened out from parent "viewStart" using listings.</p>