For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /api/react.mainthreadobjecttypedefinition.md.
This is the dev preview website. Check out the document at lynx-stack.dev

Home > @lynx-js/react > MainThreadObjectTypeDefinition

MainThreadObjectTypeDefinition interface

Describes how a serializable initialization payload becomes a stable object in the main-thread runtime.

Signature:

export interface MainThreadObjectTypeDefinition<I, O extends object> 

Properties

Property

Modifiers

Type

Description

create

readonly

(initialValue: I) => O

Create the realized main-thread object.

This must be a capture-free Main Thread Function. Imports used by the function must come from shared-runtime modules.

type

readonly

string

A globally unique and stable type key.