Just don’t call the WinRT projection for Node.js a lock-in

If you want your JavaScript app to have access to Microsoft's OS features, it's now easier than ever. Redmond is giving JavaScript and TypeScript devs first-class access to some Windows internals to make their lives easier, via new “dynamic projections,” as Microsoft calls these new language bindings.JavaScript applications have been seeping onto the Windows desktop for years. Originally designed for the Web, JavaScript — and its more formal TypeScript superset — have been used to build desktop apps as well. The Windows Runtime API (WinRT) projection for Node.js, now available in public preview, isn't giving developers access to heretofore-forbidden Windows powers; it just makes it much easier for them to connect to these capabilities.

Through a Node.js or Electron developer environment, JavaScript developers can write hooks to data-oriented Windows Runtime APIs such as on-device AI, storage, notifications, networking, and other system capabilities.Bindings at build timePreviously, adding Windows features to JavaScript/TypeScript apps would require writing native add-ons, requiring a C++ or C# bridge, manual translations, and wrapper code for every API, according to Microsoft. Those who do not already know C++, or have a toolchain in place, were obviously left at a disadvantage.Now, a single Node runtime package, dynwinrt, can generate the needed JavaScript wrappers and TypeScript declarations for the Windows features an app desires. You’ll also need a separate package (winappCli) containing a command-line interface (CLI) setup, configuration, and samples.