Description
Creating and sharing pure typescript code has quite a few barriers that seem like the kind of complexity that TypeScript should be helping to alleviate.
I'm going through a situation right now where I want to share a pure typescript library and - unless I'm mistaken - it seems like I'm going to have to go through the pain of adding AMD to my project. Even despite the fact that it's all internal modules.
With the overall goal of making life easier for developers, I think it would be nice if:
- There was some way to reference typescript files statically such that they are used in the compile process. This could even be used to eliminate the
///
syntax used to load.d.ts
files. - There was some way to tell typescript to prepend regular javascript files to the entire build output (dependencies with
.d.ts
definitions for example).
While AMD/CommonJS are module-loading systems, they are very confusing and cluttered build systems, especially once you bring TypeScript into the mix.
It's conceivable that with these changes, you'd also reap the ability to create build profiles implicitly by defining entrypoint scripts and having typescript crawl the dependency graph. Similar to how r.js works, except at a TypeScript level.