TypeScript has so much potential, but it's SO HARD to get it working correctly with AMD and existing libraries.
Let's say I'm using jquery.d.ts from
https://github.com/borisyankov/DefinitelyTyped (or any other one, really). Then let's say I have a file called main.ts. The way I would expect it to work if I put jquery.d.ts into "./somefolder" is:
import $ = require("somefolder/jquery")
The problem is currently that the only way to do this is to add this to the ambient declarations file
declare module "somefolder/jquery" {}
You string you have to put in there has to exactly match the folder structure. That's lame because everyone will want to put them in different files.
I'm just hoping you guys have a way to make AMD with existing modules easier, because right now it's super hard.
(EDIT) Proposal --
A really easy way to solve this is to make it possible to declare a module as an instance of interface. Something like this:
///<reference path="../components/DefinitelyTyped/Definitions/jquery-1.8.d.ts"/>
// any of these would make some kind of sense
declare module "lib/jquery" JQueryStatic
declare module "lib/jquery": JQueryStatic
declare module "lib/jquery" extends JQueryStatic {}
Then I could just use the global jquery.d.ts and make my own jquery.ts file anywhere I wanted, then set the module name to match.