@dxos/echo
    Preparing search index...

    Interface Type<A>

    Sibling of Obj / Relation for the third ECHO entity kind: type-kind entities (meta-schemas). The singleton Type const is the canonical example — it describes stored type definitions themselves.

    Not a Schema.Schema. Use Type.getSchema(value) to obtain the underlying Effect Schema and Type.update(value, draft => ...) to mutate.

    A is the instance-type phantom — what Obj.make(value, ...) would produce. Merged with the Type const value via TypeScript declaration merging.

    interface Type<A = unknown> {
        "~@dxos/echo/Kind": Type;
        "~@dxos/echo/SchemaKind": Type;
        "~@dxos/echo/Type.Instance"?: A & OfKind<Type>;
        "~@dxos/echo/Type.StaticSchema": Codec<any, any>;
        id: string;
        jsonSchema: JsonSchemaType;
        name?: string;
    }

    Type Parameters

    • A = unknown

    Hierarchy

    • BaseTypeEntity<A & OfKind<typeof EntityModule.Kind.Type>>
      • Type
    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": Type

    Schema-kind brand (type — the meta-schema kind).

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

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

    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