RejectTypeEntity:Textends{"~@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.
Rejects Type entities from Database.add at compile time via their
[KindId]brand. Used asT & RejectTypeEntity<T>to preserve inference ofT. BoundingaddonObj.Unknown | Relation.Unknowninstead would reject broadly-typed instance adds (e.g.Entity.Any,Obj.OfShape<T>), forcing casts repo-wide.