2

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

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

Comments

1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.