1#  ``with`` statement is not supported
2
3Rule ``arkts-no-with``
4
5**Severity: error**
6
7ArkTS does not support the ``with`` statement. Use other language idioms
8(including fully qualified names of functions) to achieve that same behavior.
9
10
11## TypeScript
12
13
14```
15
16    with (Math) { // Compile-time error, but JavaScript code still emitted
17        let r: number = 42
18        console.log("Area: ", PI * r * r)
19    }
20
21```
22
23## ArkTS
24
25
26```
27
28    let r: number = 42
29    console.log("Area: ", Math.PI * r * r)
30
31```
32
33
34