@dxos/echo-solid
    Preparing search index...

    Function useType

    • Subscribe to and retrieve a type by its URI from a space: a static schema's typename DXN, or a persisted (database) schema's echo: EID (what Type.getURI / getTypeURIFromQuery produce). Accepts either values or accessors for db and typeUri.

      Fans across the owning space db (persisted custom types) and the shared registry (static/runtime plugin types). Persisted types live only in the db, so a registry-only lookup misses them.

      Parameters

      • Optionaldb: MaybeAccessor<undefined | Database>

        The database instance (can be reactive)

      • OptionaltypeUri: MaybeAccessor<undefined | URI>

        The type URI to query (can be reactive)

      Returns Accessor<undefined | AnyEntity>

      An accessor that returns the current type or undefined