<p dir="auto">Badly needed for commonjs modules where you are more likely to ship JS code plus a generated <code class="notranslate">.d.ts</code> file.</p>
<p dir="auto">From codeplex : <a href="https://typescript.codeplex.com/workitem/2080" rel="nofollow">https://typescript.codeplex.com/workitem/2080</a></p>
<p dir="auto">There was an discussion about generating ambient declarations for external CommonJS modules: <a href="http://typescript.codeplex.com/workitem/2080" rel="nofollow">http://typescript.codeplex.com/workitem/2080</a></p>
<p dir="auto">But even if typescript generates the definitions as we what we want, we'll still need to add references manually, which is not doing better job than JS libs with NuGet DefinitelyTyped packages.</p>
<p dir="auto">I propose that when we publish a typescript package via npm, publish the .d.ts file(s) generated with the current style along with it.</p>
<p dir="auto">So that we can manage to write a tool (or add a feature to something like WebEssentials) to watch related node_modules directory, resolve the definition references and create wrapped definition file(s) under scripts/typings folder.</p>
<p dir="auto">Thoughts?</p>