ArticleslgStudy

computer science

ArkTS

ArkTS is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand ArkTS rather than just read about it. In short: ArkTS (short for Ark TypeScript) is a high-level general-purpose, multi-paradigm, compiled, declarative, static type programming language developed by Huawei which is an extension superset of open-source TypeScript (TS), which in turn is striving to be a superset of JavaScript (JS) formerly used in July 2022 HarmonyOS 3.0 version, alongside its evolved precursor, extended TypeScript (eTS) built for HarmonyOS develop…

Key takeaways

  • ArkTS belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect ArkTS to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of ArkTS from memory before moving on to harder problems.

Reference excerpt

ArkTS (short for Ark TypeScript) is a high-level general-purpose, multi-paradigm, compiled, declarative, static type programming language developed by Huawei which is an extension superset of open-source TypeScript (TS), which in turn is striving to be a superset of JavaScript (JS) formerly used in July 2022 HarmonyOS 3.0 version, alongside its evolved precursor, extended TypeScript (eTS) built for HarmonyOS development as a shift toward declarative programming. ArkTS compiles to machine code via its ahead-of-time compilation Ark Compiler. ArkTS was first released in September 30, 2021 on OpenHarmony, and the ArkTS toolchain has shipped in DevEco Studio since version 3.1, released in 2022. Since, OpenHarmony 4.0 release on October 26, 2023, ArkTS APIs has been added to the open source community to contribute. 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 with ArkUI declarative UI app development and 2.0 imperative app development alongside Java. ArkTS was introduced at Huawei's Developer Conference (HDC) 2022 in November 2022 on HarmonyOS 3.1 release. 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 iterative HarmonyOS NEXT system version of HarmonyOS operating system. 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. 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 advanced syntax that is matured on the 5.0 version of the DevEco Studio integrated development environment (IDE) that is syntactically rigorous and provides more complete and rich capabilities compared to previous versions.

History 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 language Java 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 of TypeScript, 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. A beta version of the programming 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 under OpenAtom Foundation when Huawei contributed the ArkTS codes and APIs of HarmonyOS 3.0 which was formerly named eTS in September 2021. During HDC 2021, in October 2021, Huawei announced ArkUI with DevEco Studio 3.0 for HarmonyOS 3.0 era, which provides a framework for declarative user 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. Since December 2023, ArkUI is evolved into OpenHarmony 4.0, also Eclipse 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 named ArkUI-X to reduce app development time and costs by porting it to multiple platforms on Android, iOS, Microsoft Windows and macOS, etc. Including EulerOS in containers that shares HarmonyOS application software stack technologies making it easier for interoperability.

Version history Version history of ArkTS releases with OpenHarmony (API 7) and HarmonyOS (API 8) convergence SDK.

Platforms ArkTS supports the operating systems HarmonyOS, Linux, Windows, macOS, iOS, and Android. ArkTS is designed to interoperate existing eTS and JavaScript codes previously developed for Huawei products above HarmonyOS, such as HarmonyOS Design language system, graphical user interface (GUI) system. On Huawei devices running HarmonyOS, it links with the eTS runtime library, which allows native application programming interfaces (APIs) in DevEco Studio templates, C, C++, and ArkTS code to run within one program.

Features 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 enables object-oriented programming with the support for classes, subtyping, and method overriding. Optionals allow nil values to be handled explicitly. Concurrent programs can be written using async/await syntax and actors isolate shared mutable state in order to eliminate data races.

Examples The following is an example of a simple Hello 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 named Index.

ArkUI-X

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with ArkTS

Start with the simplest possible case. Write down what ArkTS claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to ArkTS before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about ArkTS ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of ArkTS

In research
ArkTS appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses ArkTS in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
ArkTS is common in secondary-school and first-year university syllabi. It links to neighbouring topics 2021 software, Cross-platform software, Huawei products, so understanding it makes those chapters shorter.
In everyday life
Look for ArkTS outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “ArkTS” →

How to study ArkTS in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what ArkTS means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain ArkTS out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is ArkTS in simple terms?

ArkTS (short for Ark TypeScript) is a high-level general-purpose, multi-paradigm, compiled, declarative, static type programming language developed by Huawei which is an extension superset of open-source TypeScript (TS), which in turn is striving to be a superset of JavaScript (JS) formerly used in…

Why does ArkTS matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study ArkTS?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on ArkTS.

Tags

  • 2021 software
  • Cross-platform software
  • Huawei products
  • JavaScript programming language family
  • Object-based programming languages
  • Programming languages created in 2021
  • Scripting languages
  • Software using the Apache license
  • Source-to-source compilers
  • Statically typed programming languages

Keep exploring