papi-dts
    Preparing search index...
    interface FrontendNetworkObjectService {
        get: <T extends object>(
            id: string,
            createLocalObjectToProxy?: LocalObjectToProxyCreator<T>,
        ) => Promise<undefined | NetworkObject<T>>;
        onDidCreateNetworkObject: PlatformEvent<NetworkObjectDetails>;
    }

    Hierarchy (View Summary)

    Index

    Properties

    get: <T extends object>(
        id: string,
        createLocalObjectToProxy?: LocalObjectToProxyCreator<T>,
    ) => Promise<undefined | NetworkObject<T>>

    Type declaration

      • <T extends object>(
            id: string,
            createLocalObjectToProxy?: LocalObjectToProxyCreator<T>,
        ): Promise<undefined | NetworkObject<T>>
      • Get a network object that has previously been set up to be shared on the network. A network object is a proxy to an object living somewhere else that local code can use.

        Running this function twice with the same inputs yields the same network object.

        Type Parameters

        • T extends object

        Parameters

        • id: string

          ID of the network object - all processes must use this ID to look up this network object

        • OptionalcreateLocalObjectToProxy: LocalObjectToProxyCreator<T>

          Function that creates an object that the network object proxy will be based upon. The object this function creates cannot have an onDidDispose property. This function is useful for setting up network events on a network object.

        Returns Promise<undefined | NetworkObject<T>>

        A promise for the network object with specified ID if one exists, undefined otherwise

    onDidCreateNetworkObject: PlatformEvent<NetworkObjectDetails>