For AI agents: the complete documentation index is available at /zh/llms.txt, the full documentation bundle is available at /zh/llms-full.txt, and this page is available as Markdown at /zh/api/react.mainthreadobjecthandle.md.
这是开发预览网站。请访问正式文档 lynx-stack.dev

Home > @lynx-js/react > MainThreadObjectHandle

MainThreadObjectHandle class

An opaque source-runtime handle for an object realized on the main thread.

A handle has logical identity and is serializable, but it is not the target object or an RPC stub. Capturing it in a main-thread function resolves it to the corresponding local target object. Development builds may wrap the background handle in a throwing guard solely to diagnose invalid access; that guard never forwards operations between runtimes.

Signature:

export declare abstract class MainThreadObjectHandle<I, O extends object> 

Properties

Property

Modifiers

Type

Description

creationPayload

readonly

Readonly<I>

The payload used to create the realized object.

Readonly is a TypeScript contract; the value is not frozen at runtime.