This article has multiple issues. Please helpimprove it or discuss these issues on thetalk page.(Learn how and when to remove these messages) (Learn how and when to remove this message)
|
| ArkTS | |
|---|---|
| Paradigm | Multi-paradigm:functional,generic,declarative,object-oriented |
| Family | ECMAScript |
| Developer | Huawei,OpenAtom Foundation,Eclipse Foundation open-source contributors |
| First appeared | September 30, 2021; 4 years ago (2021-09-30) |
| Stable release | 6.0.1.112 / November 20, 2025; 2 months ago (2025-11-20) |
| Typing discipline | static,duck,gradual,structural |
| Memory management | automatic |
| Scope | lexical |
| OS | HarmonyOS,OpenHarmony,Oniro,macOS,Windows,Android,iOS |
| License | Apache proprietary (up to HarmonyOS 3.1) |
| Filename extensions | .ets, .ts |
| Website | developer |
| Influenced by | |
| TypeScript,Swift,Objective-C,JavaScript,C#,F#,Java,ActionScript,AtScript,AssemblyScript | |
ArkTS (short forArk TypeScript) is ahigh-levelgeneral-purpose,multi-paradigm,compiled,declarative,static typeprogramming language developed byHuawei which is an extension superset ofopen-sourceTypeScript (TS), in turn a superset ofJavaScript (JS) formerly used in July 2022HarmonyOS 3.0 version, alongside its evolved precursor, extended TypeScript (eTS) built for HarmonyOS development as a shift towarddeclarative programming.[1] ArkTS compiles to machine code via itsahead-of-time compilationArk Compiler. ArkTS was first released in September 30, 2021 onOpenHarmony, and the ArkTS toolchain has shipped inDevEco Studio since version 3.1, released in 2022.[2] Since, OpenHarmony 4.0 release on October 26, 2023, ArkTS APIs has been added to the open source community to contribute.[3]
Huawei intended ArkTS to support many core concepts associated with extended TypeScript (eTS) based on TypeScript and in turn JavaScript from previous versions of HarmonyOS 3.0 withArkUI declarative UI app development and 2.0 imperative app development alongsideJava. ArkTS was introduced at Huawei's Developer Conference (HDC) 2022 in November 2022 on HarmonyOS 3.1 release.[4]
It underwent an upgrade in HDC 2023 with HarmonyOS 4.0 API 10 and a major upgrade at January 18, 2024 HarmonyOS Ecology Developer Conference alongside, new Cangjie programming language announced by Huawei where both programming languages become the primary languages for the iterativeHarmonyOS NEXT system version of HarmonyOS operating system.[5][6]
The current version of ArkTS, was released on October 26, 2023, for open source OpenHarmony 4.0 API 10 with new ArkTS APIs via DevEco Studio 4.0 Canary build after HarmonyOS 4.0 release on August 4, 2023.[7] Following current stable release, a preview released in January 2024, with OpenHarmony 4.1 Beta 1 API 11. Alongside, internal HarmonyOS NEXT Developer Preview 1 and 2 with latest API 11-12 preview based on latest version of OpenHarmony that features advancedsyntax that is matured on the 5.0 version of the DevEco Studiointegrated development environment (IDE) that is syntactically rigorous and provides more complete and rich capabilities compared to previous versions.[8]
Development of ArkTS started in 2015 by HarmonyOS founder Wang Chenglu, with the eventual collaboration of many other programmers at Huawei at that time began development of HarmonyOS after being incubated in the R&D labs for a few years as earlier as 2012 within the company. ArkTS was motivated by the need for a replacement for Huawei's earlier programming languageJava that not only carried legal baggage but also performance issues, underdeveloped applications in a weaker SDK both HarmonyOS 1.0 Vision TV, IoT and HarmonyOS 2.0 expanded version shipped with and improvements that still lacked in HarmonyOS 3.0 eTS/JS development for HarmonyOS app development that lacked modern features for the modern operating system. ArkTS took language ideas from the likes ofTypeScript,Swift,Rust,JavaScript. In November 2022, Huawei revealed the programming language evolved from eTS on HarmonyOS 3.0 to ArkTS on HarmonyOS 3.1 update. Abeta version of theprogramming language was released to registered Huawei developers at the conference and it was not open-sourced at that time until OpenHarmony 3.0 API 7 era underOpenAtom Foundation when Huawei contributed the ArkTS codes and APIs of HarmonyOS 3.0 which was formerly named eTS in September 2021.[9]
During HDC 2021, in October 2021, Huawei announced ArkUI with DevEco Studio 3.0 for HarmonyOS 3.0 era, which provides a framework fordeclarativeuser interface (UI) structure design across all Huawei devices for eTS development which evolved into ArkTS development by HDC 2022 for HarmonyOS 3.1. ArkTS first appeared on OpenAtom's OpenHarmony 3.1 Beta on December 31, 2021 alongside its documentation.[10] Since December 2023, ArkUI is evolved into OpenHarmony 4.0, alsoEclipse Foundation global OpenHarmony-based Oniro with ArkTS programming language support and APIs. Also, Huawei announced it would evolve ArkUI into a cross-platform declarative UI namedArkUI-X to reduce app development time and costs byporting it to multiple platforms onAndroid,iOS,Microsoft Windows andmacOS, etc. IncludingEulerOS in containers that shares HarmonyOS application software stack technologies making it easier for interoperability.[11][12]
Version history of ArkTS releases with OpenHarmony (API 7) and HarmonyOS (API 8) convergence SDK.
| Version | Release date | macOS | Windows |
|---|---|---|---|
| ArkTS (eTS) LTS [Long Term Support] 3.0.0.0 | September 30, 2021 | Yes | Yes |
| ArkTS (eTS) 3.1.13.6 | March 30, 2022 | Yes | Yes |
| ArkTS 3.2.13.5 | April 9, 2023 | Yes | Yes |
| ArkTS 4.0.10.16 | October 26, 2023 | Yes | Yes |
| ArkTS 4.1.7.5[13] | March 30, 2024 | Yes | Yes |
| ArkTS 5.0.0.71[14] | September 29, 2024 | Yes | Yes |
| ArkTS 5.0.1.111[15] | November 23, 2024 | Yes | Yes |
| ArkTS 5.0.2.123[16] | January 23, 2025 | Yes | Yes |
| ArkTS 5.0.3.135[17] | March 25, 2025 | Yes | Yes |
| ArkTS 5.1.0.107[18] | May 4, 2025 | Yes | Yes |
| ArkTS 5.1.1.212[19] | June 30, 2025 | Yes | Yes |
| ArkTS 6.0.1.112[20] | November 20, 2025 | Yes | Yes |
ArkTS supports theoperating systems HarmonyOS,Linux, Windows, macOS, iOS, and Android.
A key aspect of ArkTS design is its ability to interoperate with the huge body of existing eTS and JavaScript code developed for Huawei products over prior versions of HarmonyOS, such as HarmonyOS Design language system,graphical user interface (GUI) system. On Huawei devices running HarmonyOS, it links with the eTSruntime library, which allows nativeapplication programming interfaces (APIs) in DevEco Studio templates,C,C++, and ArkTS code to run within one program.[22]
ArkTS is a general purpose programming language that employs modern programming-language theory concepts and strives to present a simple, yet powerful syntax. ArkTS incorporates innovations and conventions from various programming languages, with notable inspiration from TypeScript, which it replaced as the primary development language on HarmonyOS.
ArkTS was designed to be easy, safe while not sacrificing speed. By default ArkTS manages all memory automatically and ensures variables are always initialized before use. Array accesses are checked for out-of-bounds errors and integer operations are checked for overflow. Protocols define interfaces that types may adopt, while extensions allow developers to add functionality to existing types. ArkTS enablesobject-oriented programming with the support forclasses,subtyping, andmethod overriding. Optionals allownil values to be handled explicitly. Concurrent programs can be written usingasync/await syntax andactors isolate shared mutable state in order to eliminate data races.[23]
The following is an example of a simpleHello World program. It is standard practice in ArkUI with ArkTS programming language to separate the application struct and views into different structs, with the main view namedIndex.[24]
importArkTS// Index.etsimportrouterfrom'@ohos.router';@Entry@ComponentstructIndex{@Statemessage:string='Hello World'build(){Row(){Column(){Text(this.message).fontSize(50).fontWeight(FontWeight.Bold)// Add a button to respond to user clicks.Button(){Text('Next').fontSize(30).fontWeight(FontWeight.Bold)}.type(ButtonType.Capsule).margin({top:20}).backgroundColor('#0D9FFB').width('40%').height('5%')// Bind the onClick event to the Next button so that clicking the button redirects the user to the second page..onClick(()=>{router.pushUrl({url:'pages/Second'})})}.width('100%')}.height('100%')}}
ArkUI-X is an open-sourceuser interface (UI)software development kit which is extension of ArkUI for ArkTS development created by Huawei. It is used to developcross platform applications from onecodebase for any platform such as Android, iOS, OpenHarmony, Oniro and HarmonyOS which was released on December 8, 2023, after Canary 1 build on August 4, 2023.[25] ArkUI replaces the olderInterface Builder paradigm with a new declarative development paradigm.
ARK TypeScript Runtime is aruntime system used in ArkTS applications derived from former HarmonyOS 3.0/OpenHarmony 3.1 API 8 eTS (extendedTypeScript) on OpenHarmony, and HarmonyOS apps exploiting custom OpenHarmony-based HarmonyOS NEXT core operating system. It contains an allocator andgarbage collector (GC) for ArkTS/JS objects, a standard library that conforms to the ECMAScript specification, an interpreter for running the ARK Bytecode (abc) generated by ARK front-end components, an inline cache for acceleration, a statically typed compiler, a C++/C function interface for Native API (NAPI) application development at runtime, and other modules inahead-of-time compilation via DevEco Studio since version 3.1.1 on both HarmonyOS 3.1 SDK and OpenHarmony 3.2 SDK API 9.[26]
The ets_frontend is a front-end tool in the ARK Runtime Subsystem which combines the ace-ets2bundle component that supports converting ETS programming language files into ARK bytecode files. They correspond with ArkTS app development in OpenHarmony and HarmonyOS development under HarmonyOS NEXT system.[27]
The ArkCompiler Toolchain provides developers with debugging tools for ArkTS application development, such as the Debugger, CPUProfiler, and HeapProfiler. The debugging and tuning capabilities provided by the Ark Toolchain is used through DevEco Studio IDE that relies on the ArkCompiler Runtime to provide runtime-related information to developers.[28]
WithArk Compiler, it supports a variety of dynamic and static programming languages such asJavaScript,TypeScript, and ArkTS. It is the compiling and runtime base that enables OpenHarmony alongside HarmonyOS NEXT to run on multiple device forms such as smart devices, mobile phones, PCs, tablets, TVs, automobiles, and wearables. ArkCompiler consists of two parts, compiler toolchain and runtime.[29]
DevEco Studio for HarmonyOS development using default declarative ArkUI, also other third-party UI frameworks on OpenHarmony SDK, ArkUI-X cross-platform development with Android and iOS support.[30]