# What is ArkTS? The language behind OpenHarmony and HarmonyOS apps > ArkTS is the preferred language for OpenHarmony and HarmonyOS apps, built on TypeScript with stricter static typing. See how it differs from TypeScript, with code examples. Source: https://ohosify.com/en/blog/what-is-arkts Published: 2026-10-01 **Short answer:** ArkTS is the preferred programming language for OpenHarmony and HarmonyOS application development. It is built on TypeScript and keeps its basic style, but adds stricter rules, such as mandatory static typing, so the code can be checked at compile time and run faster. ## What is ArkTS? According to the official OpenHarmony documentation, ArkTS "extends" the TypeScript ecosystem while maintaining the basic style of TypeScript. It stays compatible with the TypeScript and JavaScript ecosystems where possible, and it improves static checking and analysis during development, which makes programs more stable and faster. You use ArkTS together with ArkUI, the declarative UI framework, inside DevEco Studio. ## How is ArkTS different from TypeScript? The documented key characteristics (API version 10 and later) are: | Feature | What it means | |---|---| | Mandatory static typing | Types are known at compile time, so the compiler verifies the code and less checking is needed at run time. | | Fixed object layout | An object's structure cannot change while the program runs. | | Restricted operators | Operator behavior is limited for clarity and performance. For example, the unary plus is restricted to numeric types. | | No structural typing | Not supported, because of implementation complexity. | In practice this means that some dynamic TypeScript patterns, such as the `any` type, are not allowed in ArkTS. Follow the official TypeScript-to-ArkTS adaptation rules when porting code. ## What does ArkTS code look like? The syntax is familiar if you know TypeScript. Variables use `let` and `const`: ```ts let hi: string = 'hello'; const hello: string = 'hello'; ``` Arrays, enums and union types: ```ts let names: string[] = ['Alice', 'Bob', 'Carol']; enum ColorSet { Red, Green, Blue } type Animal = Cat | Dog | Frog | number | string | null; ``` Functions and classes declare their types explicitly: ```ts function add(x: string, y: string): string { return `${x} ${y}`; } class Person { public name: string = ''; constructor(n: string) { this.name = n; } } ``` ## How does null safety work in ArkTS? All types are non-nullable by default. To allow `null`, use a union type, and use optional chaining to access properties safely: ```ts let x: number | null = null; // return this.spouse?.nick; ``` ## How do you build a UI with ArkTS and ArkUI? A page is a `struct` with the `@Component` decorator and a `build()` method. `@Entry` marks the page as an entry, and `@State` makes a value reactive, so the UI updates when it changes: ```ts @Entry @Component struct Index { @State message: string = 'Hello World'; build() { Row() { Column() { Text(this.message) .fontSize(50) .fontWeight(FontWeight.Bold) } .width('100%') } .height('100%') } } ``` Build and run this in your first project: [Your first ArkTS app](/en/blog/first-arkts-app). ## Next steps - [How to install DevEco Studio](/en/blog/install-deveco-studio) - [Your first ArkTS app](/en/blog/first-arkts-app) - Official language reference: [OpenHarmony docs on GitHub](https://github.com/openharmony/docs)