@dxos/echo
    Preparing search index...

    Type Alias RejectTypeEntity<T>

    RejectTypeEntity: T extends { "~@dxos/echo/Kind": EntityKind.Type }
        ? {
            __error: "Type entities must be persisted via db.addType(), not db.add().";
        }
        : T

    Rejects Type entities from Database.add at compile time via their [KindId] brand. Used as T & RejectTypeEntity<T> to preserve inference of T. Bounding add on Obj.Unknown | Relation.Unknown instead would reject broadly-typed instance adds (e.g. Entity.Any, Obj.OfShape<T>), forcing casts repo-wide.

    Type Parameters

    • T