1# Usage of standard library is restricted 2 3Rule ``arkts-limited-stdlib`` 4 5**Severity: error** 6 7ArkTS does not allow using some APIs from the TypeScript/JavaScript standard library. 8The most part of the restricted APIs relates to manipulating objects in a 9dynamic manner, which is not compatible with static typing. The usage of 10the following APIs is prohibited: 11 12Properties and functions of the global object: ``eval`` 13 14``Object``: ``__proto__``, ``__defineGetter__``, ``__defineSetter__``, 15``__lookupGetter__``, ``__lookupSetter__``, ``assign``, ``create``, 16``defineProperties``, ``defineProperty``, ``freeze``, 17``fromEntries``, ``getOwnPropertyDescriptor``, ``getOwnPropertyDescriptors``, 18``getOwnPropertySymbols``, ``getPrototypeOf``, 19``hasOwnProperty``, ``is``, ``isExtensible``, ``isFrozen``, 20``isPrototypeOf``, ``isSealed``, ``preventExtensions``, 21``propertyIsEnumerable``, ``seal``, ``setPrototypeOf`` 22 23``Reflect``: ``apply``, ``construct``, ``defineProperty``, ``deleteProperty``, 24``getOwnPropertyDescriptor``, ``getPrototypeOf``, ``isExtensible``, 25``preventExtensions``, ``setPrototypeOf`` 26 27``Proxy``: ``handler.apply()``, ``handler.construct()``, 28``handler.defineProperty()``, ``handler.deleteProperty()``, ``handler.get()``, 29``handler.getOwnPropertyDescriptor()``, ``handler.getPrototypeOf()``, 30``handler.has()``, ``handler.isExtensible()``, ``handler.ownKeys()``, 31``handler.preventExtensions()``, ``handler.set()``, ``handler.setPrototypeOf()`` 32 33 34## See also 35 36- Recipe 001: Objects with property names that are not identifiers are not supported (``arkts-identifiers-as-prop-names``) 37- Recipe 002: ``Symbol()`` API is not supported (``arkts-no-symbol``) 38- Recipe 029: Indexed access is not supported for fields (``arkts-no-props-by-index``) 39- Recipe 060: ``typeof`` operator is allowed only in expression contexts (``arkts-no-type-query``) 40- Recipe 066: ``in`` operator is not supported (``arkts-no-in``) 41- Recipe 137: ``globalThis`` is not supported (``arkts-no-globalthis``) 42 43 44