@dxos/echo
    Preparing search index...

    Interface Obj<T, Fields>

    TypeScript type for an ECHO object type — a Type.Type<A> entity.

    T is the instance type produced by Obj.make(Foo, props). Fields is retained as a structural hint (the runtime value still carries .fields), but consumers should derive instance/encoded types via Type.InstanceType.

    Not a Schema.Schema. Foo.ast / Schema.Schema.Type<typeof Foo> / Schema.extend(Foo) no longer typecheck — extract the Effect Schema via Type.getSchema(Foo) first, or derive instance types via Type.InstanceType<typeof Foo>.

    class Person extends Type.makeObject<Person>(DXN.make('com.example.type.person', '0.1.0'))(
    Schema.Struct({ name: Schema.String }),
    ) {}
    interface Obj<T, Fields extends Schema.Struct.Fields = Schema.Struct.Fields> {
        "~@dxos/echo/Kind": Type;
        "~@dxos/echo/SchemaKind": Object;
        "~@dxos/echo/Type.Instance"?: T & OfKind<Object>;
        "~@dxos/echo/Type.StaticSchema": Codec<any, any>;
        fields: Fields;
        id: string;
        jsonSchema: JsonSchemaType;
        name?: string;
    }

    Type Parameters

    • T
    • Fields extends Schema.Struct.Fields = Schema.Struct.Fields

    Hierarchy (View Summary)

    Index

    Properties

    "~@dxos/echo/Kind": Type

    Entity-kind brand of the type-entity value itself — always EntityKind.Type. The kind of instance the type describes lives on [SchemaKindId] (Object / Relation / Type). Lets Obj.isObject / Relation.isRelation reject type entities by a single [KindId] check.

    "~@dxos/echo/SchemaKind": Object

    Schema-kind brand (object).

    "~@dxos/echo/Type.Instance"?: T & OfKind<Object>
    "~@dxos/echo/Type.StaticSchema": Codec<any, any>

    Source Effect Schema — used internally by Type.getSchema(self).

    fields: Fields

    The fields defined in the original struct schema. Allows accessing field definitions for introspection.

    id: string

    Object id. Like all ECHO entities, type entities always carry an id — stamped at construction for in-memory (static) declarations and assigned by the database once persisted. The id does NOT determine the entity's URI: static types resolve to their typename DXN, persisted types to echo:///<id> (see getTypeURIFromSpecifier).

    jsonSchema: JsonSchemaType
    name?: string