I have been attempting to get to know this new ‘TypeScript’ stuff, and I am a bit curious on something.
Can it still work with existing javascript frameworks like jQuery without the need for a definition file with all of those interfaces? I have been attempting to test this out manually, but so far am a little unsure of how far the functionality extends.
update
by ‘work’ I am referring to simple functionality, not IDE features like auto-completion.
The simple answer is yes.
TypeScript is able to interact fully with any existing Javascript library. You only need the definition file if you want tooling in the IDE to make it easier to use.
Also, if you don’t include the definition file, the TypeScript compiler might get mad at you for using a variable that hasn’t been defined in your code (like
$). To get around that you might have to do something likeThat said, I’m not sure why you wouldn’t want to use the jQuery definition file. It surely makes it much more pleasant to write jQuery with.