• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#  ``require`` and ``import`` assignment are not supported
2
3Rule ``arkts-no-require``
4
5**Severity: error**
6
7ArkTS does not support importing via ``require``.
8``import`` assignments are not supported either.
9Use regular ``import`` instead.
10
11
12## TypeScript
13
14
15```
16
17    import m = require("mod")
18
19```
20
21## ArkTS
22
23
24```
25
26    import * as m from "mod"
27
28```
29
30## See also
31
32- Recipe 126:  ``export = ...`` assignment is not supported (``arkts-no-export-assignment``)
33
34
35
36