Skip to main content

Module globals

Module globals 

Source
Expand description

Global type registry and built-in shape definitions, ported from Globals.ts.

Provides DEFAULT_SHAPES (built-in object shapes) and DEFAULT_GLOBALS (global variable types including React hooks and JS built-ins).

Structs§

GlobalRegistry
Registry mapping global names to their types.

Functions§

base_globals
Get a reference to the static base globals registry.
base_shapes
Get a reference to the static base shapes registry.
build_builtin_shapes
Build the built-in shapes registry. This corresponds to TS BUILTIN_SHAPES defined at module level in ObjectShape.ts.
build_default_globals
Build the default globals registry. This corresponds to TS DEFAULT_GLOBALS.
get_reanimated_module_type
Build the reanimated module type. Ported from TS getReanimatedModuleType.
install_type_config
Convert a user-provided TypeConfig into an internal Type, registering shapes as needed. Ported from TS installTypeConfig in Globals.ts. If errors is provided, hook-name vs hook-type consistency validation errors are collected there.
install_type_config_with_errors
Like install_type_config but collects validation errors.

Type Aliases§

Global
Type alias matching TS Global = BuiltInType | PolyType. In the Rust port, both map to our Type enum.