I'm not sure I follow. Classes are declared at the global scope, but I'm not sure how that conflicts with '$'. They do create a '__extends' function, but I don't know of any '$' symbols that are created.

It is not currently possible in TypeScript to get the isolation from changes to the jQuery binding that the above examples provides. However, in general, it should be very rare that this is actually important. Why do you want to use the enacapsulation
technique you described? Note that jQuery provides a binding for $ already, and you can use that directly.

There is a feature we are considering to allow anonymous modules, which would allow your example to be written: