Domanda

Where are TypeScript definitions for the WinJS library?

Actually why is WinJS not written in TypeScript in the first place?

È stato utile?

Soluzione

The definitions for WinJS are here:

https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/winjs

WinJS pre-dates TypeScript. That's not to say they won't transfer it to TypeScript now given TypeScript 1.0 was officially announced last night.

Altri suggerimenti

There are also some definitions in the Official TypeScript repository found here: https://typescript.codeplex.com/SourceControl/latest#typings/

They might be the same as the one on DefnitelyTyped but i'm not sure.

It seems WinJS definitions on DefinitelyTyped are not updated which is sad. So best source today is probably WinJS github repo: https://github.com/winjs/winjs/tree/master/typings/winjs

I have a tutorial about when to use DefinitelyTyped vs Typings, as I found both of them to be very confusing.

TypeScript wasn't a think when WinJS was first created as well. Not everyone wants to use TypeScript, so to get web developers on board, I'd imagine that simply using JavaScript is a better starting point than requiring them to learn a new language (TypeScript) on top of learning the WinJS programming model.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top