I want to use TypeScript just for typings. I don't want to use classes, interfaces, or even use TypeScript definitions. The reason is that I'm using some jQuery plugins that don't have TypeScript definitions and I can't write them because of time constraints.
I keep reading that I should be able to use typings without the other features because TypeScript is based on JavaScript, but I really can't find a way. Consider the code below. I'm not using the jQuery type definition, therefore I get, "Cannot find name $". And again, I don't want to use TypeScript definitions if they don't cover everything I use.
So the TS file does not get transpiled into a JS file. And the build in Visual Studio 2015 fails.
My question is - how can I have this working in Visual Studio 2015? This is my TS file:
class Dto {
name: string;
age: number;
}
$.ajax({
url: "",
method: "PUT",
data: {}
})
.then(function (response: Dto) {
response.age = 16;
});