Static TypeScript Launched
Written by Alex Denham   
Thursday, 05 September 2019

Researchers from Microsoft have shown off Static TypeScript (STS), a subset of TypeScript aimed at use on embedded programming platforms.

Static TypeScript (STS) consists of a subset of TypeScript implemented fully in TypeScript, along with its compiler/linker toolchain, that runs in the web browser.

The researchers, Thomas Ball, Peli de Halleux and Michał Moskal, say STS is designed to be useful in practice (especially in education), while also being good for small devices because you can use static compilation. A user’s STS program is compiled to machine code in the browser and linked against a precompiled C++ runtime, producing an executable that is more efficient than the more usual embedded interpreter approach, extending battery life and making it possible to run on devices with as little as 16 kB of RAM (such as the BBC micro:bit). The BBCmicro:bit is a small programmable Arduino-inspired computer that is provided to all year 7 students (age 10 to 11) in the UK and has since gone global, with four million units distributed worldwide to date via the micro:bit Education Foundation. However, on such devices embedded interpreters are slow, affecting responsiveness and battery life, and limiting the applications that can be deployed.

By contrast, STS is a syntactic subset of TypeScript supported by a compiler written in TypeScript that generates machine code that runs efficiently in as little as 15-256Kb of RAM. The developers say STS eliminates most of the “bad parts” of JavaScript;following StrongScript, STS uses nominal typingfor statically declared classes and supports efficient compilation of classes using classic techniques for v-tables. The STS toolchain runs offline, once loaded into a web browser, without the need for a C/C++ compiler – the toolchain, implemented in TypeScript, compiles STS to Thumb machine code and links this code against a pre-compiled C++ runtime in the browser, which is often the only available execution environment in schools.typescriptlogo

More Information

Static TypeScript Research Paper

Related Articles

TypeScript 3.5 Adds Smart Select 

TypeScript 3.2 Gets Stricter Checking

TypeScript 3.1 Adds Mappable Tuples

TypeScript 3.0 Adds Project References 

TypeScript Adds Unused Span Reporting

TypeScript Adds Conditional Types

TypeScript 2.7 Improves Type Inference

TypeScript 2.5 Adds Optional Catch Binding

TypeScript 2.4 Adds Dynamic Import Expressions  

TypeScript 2.3 Released

TypeScript 2.2 Adds More Code Actions 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Microsoft Is Ending Support For Windows Android Subsystem
07/03/2024

Microsoft has announced that it is ending support for running Android applications under Windows 11. The support will cease next year. This announcement was followed rapidly by Amazon announcing the e [ ... ]



GitHub Introduces Code Scanning
26/03/2024

GitHub has announced a public beta of a code scanner that automatically fixes problems. The new feature was announced back in November, but has now moved to public beta status.  


More News

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Thursday, 05 September 2019 )