13af6ab5fSopenharmony_ci# Universal module definitions (UMD) are not supported 23af6ab5fSopenharmony_ci 33af6ab5fSopenharmony_ciRule ``arkts-no-umd`` 43af6ab5fSopenharmony_ci 53af6ab5fSopenharmony_ci**Severity: error** 63af6ab5fSopenharmony_ci 73af6ab5fSopenharmony_ciArkTS does not support universal module definitions (UMD) because in the 83af6ab5fSopenharmony_cilanguage there is no concept of "script" (as opposed to "module"). 93af6ab5fSopenharmony_ciBesides, in ArkTS import is a compile-time, not a runtime feature. 103af6ab5fSopenharmony_ciUse ordinary syntax for ``export`` and ``import`` instead. 113af6ab5fSopenharmony_ci 123af6ab5fSopenharmony_ci 133af6ab5fSopenharmony_ci## TypeScript 143af6ab5fSopenharmony_ci 153af6ab5fSopenharmony_ci 163af6ab5fSopenharmony_ci``` 173af6ab5fSopenharmony_ci 183af6ab5fSopenharmony_ci // math-lib.d.ts 193af6ab5fSopenharmony_ci export const isPrime(x: number): boolean 203af6ab5fSopenharmony_ci export as namespace mathLib 213af6ab5fSopenharmony_ci 223af6ab5fSopenharmony_ci // in script 233af6ab5fSopenharmony_ci mathLib.isPrime(2) 243af6ab5fSopenharmony_ci 253af6ab5fSopenharmony_ci``` 263af6ab5fSopenharmony_ci 273af6ab5fSopenharmony_ci## ArkTS 283af6ab5fSopenharmony_ci 293af6ab5fSopenharmony_ci 303af6ab5fSopenharmony_ci``` 313af6ab5fSopenharmony_ci 323af6ab5fSopenharmony_ci // math-lib.d.ts 333af6ab5fSopenharmony_ci namespace mathLib { 343af6ab5fSopenharmony_ci export isPrime(x: number): boolean 353af6ab5fSopenharmony_ci } 363af6ab5fSopenharmony_ci 373af6ab5fSopenharmony_ci // in program 383af6ab5fSopenharmony_ci import { mathLib } from "math-lib" 393af6ab5fSopenharmony_ci mathLib.isPrime(2) 403af6ab5fSopenharmony_ci 413af6ab5fSopenharmony_ci``` 423af6ab5fSopenharmony_ci 433af6ab5fSopenharmony_ci## See also 443af6ab5fSopenharmony_ci 453af6ab5fSopenharmony_ci- Recipe 129: Wildcards in module names are not supported (``arkts-no-module-wildcards``) 463af6ab5fSopenharmony_ci 473af6ab5fSopenharmony_ci 48