@dxos/react-client
    Preparing search index...

    Interface DevtoolsHook

    A hook bound to window.DXOS.

    interface DevtoolsHook {
        client?: Client;
        downloadDiagnostics?: () => Promise<void>;
        DXN: typeof DXN;
        exportProfile?: () => Promise<void>;
        feeds?: Accessor<unknown>;
        fetchDiagnostics: (id: string, instanceTag?: string) => Promise<void>;
        Filter: Filter;
        getMeta: {
            (
                entity: { "~@dxos/echo/Kind": Object; id: string },
            ): { keys: { id: string; source: string }[]; tags?: string[] };
            (
                entity: Unknown | Snapshot<Unknown>,
            ): {
                keys: readonly { id: string; source: string }[];
                tags?: readonly string[];
            };
        };
        halo?: Halo;
        host?: ClientServicesHost;
        importModule: (module: string) => unknown;
        importProfile?: () => Promise<void>;
        joinTables: any;
        listDiagnostics: () => Promise<void>;
        Obj: __module;
        openClientRpcServer: () => Promise<boolean>;
        openDevtoolsApp?: () => void;
        Query: Query;
        Ref: __module;
        Relation: Relation;
        reset: () => void;
        Schema: __module;
        spaces?: Accessor<Space | DataSpace>;
        tracing: TraceProcessor;
        Type: Type;
        get(id: string | DXN): Promise<any>;
    }
    Index

    Properties

    client?: Client
    downloadDiagnostics?: () => Promise<void>
    DXN: typeof DXN
    exportProfile?: () => Promise<void>
    feeds?: Accessor<unknown>
    fetchDiagnostics: (id: string, instanceTag?: string) => Promise<void>
    Filter: Filter
    getMeta: {
        (
            entity: { "~@dxos/echo/Kind": Object; id: string },
        ): { keys: { id: string; source: string }[]; tags?: string[] };
        (
            entity: Unknown | Snapshot<Unknown>,
        ): {
            keys: readonly { id: string; source: string }[];
            tags?: readonly string[];
        };
    }

    Type declaration

      • (
            entity: { "~@dxos/echo/Kind": Object; id: string },
        ): { keys: { id: string; source: string }[]; tags?: string[] }
      • Get the metadata for an object. Returns mutable meta when passed a mutable object (inside Obj.change callback). Returns read-only meta when passed a regular object or snapshot.

        Parameters

        • entity: { "~@dxos/echo/Kind": Object; id: string }

        Returns { keys: { id: string; source: string }[]; tags?: string[] }

        • keys: { id: string; source: string }[]
        • Optionaltags?: string[]

          A set of tags. Tags are arbitrary application-defined strings. ECHO makes no assumptions about the tag structure.

        // Read-only access outside change callback
        const meta = Obj.getMeta(person); // ReadonlyMeta

        // Mutable access inside change callback
        Obj.change(person, (p) => {
        const meta = Obj.getMeta(p); // ObjectMeta (mutable)
        meta.tags ??= [];
        meta.tags.push('important');
        });
      • (
            entity: Unknown | Snapshot<Unknown>,
        ): {
            keys: readonly { id: string; source: string }[];
            tags?: readonly string[];
        }
      • Get the metadata for an object. Returns mutable meta when passed a mutable object (inside Obj.change callback). Returns read-only meta when passed a regular object or snapshot.

        Parameters

        • entity: Unknown | Snapshot<Unknown>

        Returns { keys: readonly { id: string; source: string }[]; tags?: readonly string[] }

        • Readonlykeys: readonly { id: string; source: string }[]
        • Optional Readonlytags?: readonly string[]

          A set of tags. Tags are arbitrary application-defined strings. ECHO makes no assumptions about the tag structure.

        // Read-only access outside change callback
        const meta = Obj.getMeta(person); // ReadonlyMeta

        // Mutable access inside change callback
        Obj.change(person, (p) => {
        const meta = Obj.getMeta(p); // ObjectMeta (mutable)
        meta.tags ??= [];
        meta.tags.push('important');
        });
    halo?: Halo
    host?: ClientServicesHost
    importModule: (module: string) => unknown

    Import modules exposed by exposeModule from @dxos/debug.

    importProfile?: () => Promise<void>
    joinTables: any

    Utility function.

    listDiagnostics: () => Promise<void>
    Obj: __module
    openClientRpcServer: () => Promise<boolean>
    openDevtoolsApp?: () => void
    Query: Query
    Ref: __module
    Relation: Relation
    reset: () => void
    Schema: __module
    spaces?: Accessor<Space | DataSpace>
    tracing: TraceProcessor
    Type: Type

    Methods

    • Resolves the DXN.

      Parameters

      • id: string | DXN

        The DXN or DXN ID or object ID or text query.

      Returns Promise<any>