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

    不可变的 MainThreadObject 类型令牌,可检查源运行时句柄。

    工厂函数属于传入的定义,返回的令牌不会暴露它。在后台运行时中,它们会被编译为不透明的主线程函数描述符,而不会把实现打进产物。

    Type Parameters

    Type Parameter
    I
    O extends object

    Properties

    downcast

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

    把一个值收窄为正好属于该类型的源运行时句柄。

    该操作不会创建或访问实际的主线程对象。

    Parameters

    ParameterType
    valueunknown

    Returns

    MainThreadObjectHandle<I, O> | undefined


    type

    readonly type: string

    全局唯一且稳定的类型键。

    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。