You don't need to compile jquery to typescript, you just need to use a definition file that tells Typescript how the JavaScript library works.
Get definitions here:
https://github.com/DefinitelyTyped/DefinitelyTyped
or from NuGet if using Visual Studio.
Then just write your typescript as normal, and declare your library if needed:
declare var library : libraryTypedName
for example jquery's d.ts file already does this for you (check the bottom):
declare module "jquery" {
export = $;
}
declare var jQuery: JQueryStatic;
declare var $: JQueryStatic;
https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jquery
Now in your .ts
file when you type $
it should give you the typescript intellisense.
Now the only things you want to include in your bundleconfig / <script>
are the .js files, both yours and jquery / other libraries. Typescript is COMPILE time only!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…