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.mainthreadobjecttype.md.
This is the dev preview website. Check out the document at lynx-stack.dev

Home > @lynx-js/react > MainThreadObjectType

MainThreadObjectType interface

An immutable MainThreadObject type token with source-handle inspection.

The factory function belongs to the input definition and is not exposed by the returned token. In the background runtime they compile to opaque Main Thread Function descriptors rather than bundling their implementation.

Signature:

export interface MainThreadObjectType<I, O extends object> 

Properties

Property

Modifiers

Type

Description

downcast

readonly

(value: unknown) => MainThreadObjectHandle<I, O> | undefined

Narrow a value to a source-runtime handle of this exact type.

This does not create or access the realized main-thread object.

type

readonly

string

A globally unique and stable type key.