locked
[Javascript][HTML][UWP] How can I create a UWP app in Typescript/Javascript? RRS feed

  • Question

  • Hello, I'm seeking to create a full UWP app nothing but Typescript, but I heard that WinJS is no longer being updated. Does anybody know where I could find some documentation to get started as well as how to call Windows Runtime APIs using Typescript? Are their any open-source libraries for creating an alternative to the XAML UI controls and add some Fluent Design as well? Something like this, maybe.
    Sunday, June 18, 2017 2:13 AM

Answers

  • Hi,

    >>Does anybody know where I could find some documentation to get started as well as how to call Windows Runtime APIs using Typescript?

    You can refer to Migrating from javascript to get the basic concepts of migrating a js file to ts file.  And Visual Studio also offers a good support for Typescript. After installing Typescript SDK for Visual Studio. You can modify your .js file directly to .ts file. And Visual Studio will generate the typed file "winrt.d.ts" for you:

    And you are free to call any WinRT API in .ts fire directly:


    >>Are their any open-source libraries for creating an alternative to the XAML UI controls and add some Fluent Design as well?

    I don't know if there is any open-source libraries for creating an alternative to the XAML UI controls. But as a workaround, you can still use WinJS for your typescript application.  The definition types of WinJS has already created by community, you can get it from @types/winjs. After copying the types file to your project, you can use WinJS freely:

    Best Regards,

    Elvis Xia

    • Marked as answer by dvdalimi Wednesday, June 21, 2017 7:47 AM
    Tuesday, June 20, 2017 7:26 AM

All replies

  • Hello dvdalimi,

    Where I could find some documentation to get started?
    Simple steps to create UWP project with javascript here

    How to call Windows Runtime APIs using Typescript?
    Specification about TypeScript here

    Are there any open-source libraries for creating an alternative to the XAML UI controls and add some Fluent Design as well?
    You can find a lot of kinds of open source projects and libraries here

    Best regards,
    Cole


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Monday, June 19, 2017 10:49 AM
  • Do you recommend me to still use WinJS? Are their any code samples in JavaScript since Typescript doesn't have a UWP template yet? Any JavaScript UI libraries for UWP?
    • Edited by dvdalimi Monday, June 19, 2017 11:16 AM Added another question
    Monday, June 19, 2017 11:15 AM
  • Hi,

    >>Does anybody know where I could find some documentation to get started as well as how to call Windows Runtime APIs using Typescript?

    You can refer to Migrating from javascript to get the basic concepts of migrating a js file to ts file.  And Visual Studio also offers a good support for Typescript. After installing Typescript SDK for Visual Studio. You can modify your .js file directly to .ts file. And Visual Studio will generate the typed file "winrt.d.ts" for you:

    And you are free to call any WinRT API in .ts fire directly:


    >>Are their any open-source libraries for creating an alternative to the XAML UI controls and add some Fluent Design as well?

    I don't know if there is any open-source libraries for creating an alternative to the XAML UI controls. But as a workaround, you can still use WinJS for your typescript application.  The definition types of WinJS has already created by community, you can get it from @types/winjs. After copying the types file to your project, you can use WinJS freely:

    Best Regards,

    Elvis Xia

    • Marked as answer by dvdalimi Wednesday, June 21, 2017 7:47 AM
    Tuesday, June 20, 2017 7:26 AM
  • Thanks I'll definitely give this a try!
    Tuesday, June 20, 2017 1:53 PM