Using TypeScript with Dojo - import/export issues
<p>In the company I work for we are using Dojo framework and lately I have started pushing to use it with TypeScript.
I took a look around and found this great article on how this topic, you can find it here: 
<a href="https://gregwiechec.com/2016/01/creating-dojo-widget-in-typescript/" rel="nofollow">https://gregwiechec.com/2016/01/creating-dojo-widget-in-typescript/</a></p>

<p>The last 2 lines in this solution are:</p>

<pre><code>var exp = _declare("alloy.editors.StringListTs", [_Widget, _TemplatedMixin, _WidgetsInTemplateMixin, _CssStateMixin, _ValueRequiredMixin], new StringList());

export = exp;
</code></pre>

<p>I followed the same pattern and it works great, except for 2 issues that I cant seem to have a good solid solution:
1. If you look at the solution, when calling dojo declare method, the class created needs to be instantiated (this is because dojo looks at properties and not prototype).
2. The more problematic issue, is the fact that I am exporting out the dojo declared object, and not the class it self. This is problematic when you try to import the class (typescript import), and even if I declare the variable exp as the class type, I get an error saying that there is no constructor to what i am trying to import.</p>