-
Notifications
You must be signed in to change notification settings - Fork 0
API global
当前 ScriptDomain 的全局执行对象
Global execution object for the current ScriptDomain
Overview
global 是编译器提供的当前 Domain 全局对象。宿主注入的全局变量和函数可通过它读取;它也公开已加载模块注册表。普通脚本可以直接读取未被局部变量遮蔽的宿主全局名,global 更适合需要显式对象访问时使用。
globalis the compiler-provided global object for the current domain. Host-injected variables and functions can be read through it, and it exposes the loaded-module registry. Scripts can usually read an unshadowed host global directly; useglobalwhen explicit object access is useful.
Returns
当前 Domain 已加载模块的注册表对象。
Registry object for modules loaded in the current domain.
用途
仅用于诊断或高级集成;不要依赖其内部布局作为稳定的应用数据结构。
Intended for diagnostics or advanced integration; do not depend on its internal layout as application data.
@module(MAIN);
export func moduleRegistry() {
return global.modules;
}AuroraScript.JIT 4.0.0 · Documentation Home · Repository · MIT License