Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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)?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer

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).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.