Question

Can the frameworks like ScriptSharp / TypeScript be used to write WinRT UI JavaScript. If yes, How can this consume a WinRT C++/CX component (.winmd+dll)?

Was it helpful?

Solution

Typescript is very close to JavaScript and in fact your JavaScript is valid typescript provided you give the compiler enough information. So with typescript you would write your win rt app (and consume components) as if you we're writing JavaScript.

OTHER TIPS

Script# lets you author javascript, that can then be used anywhere javascript is used.

What you'll need is type declarations, so you can program against them in your c# code. So if you want to program against WinRT APIs, you'll need to define an import library (look at the script# repository in github for examples of how to author one - the repository has examples for the ones out-of-the-box ... for browser/DOM APIs and various NodeJS APIs as well as some frameworks like jQuery and Knockout).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top