For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/react/Interfaces/MainThreadObjectType.md.
  • English
    • 简体中文
  • Interface: MainThreadObjectType<I, O extends object>

    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.

    Type Parameters

    Type Parameter
    I
    O extends object

    Properties

    downcast

    readonly downcast: (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.

    Parameters

    ParameterType
    valueunknown

    Returns

    MainThreadObjectHandle<I, O> | undefined


    type

    readonly type: string

    A globally unique and stable type key.

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.