@dxos/echo
    Preparing search index...

    Interface RelationClass<Self, T, Source, Target, Fields>

    Return type for makeRelation.

    Not to be used directly, but must be exported for typescript to infer the type.

    interface RelationClass<
        Self,
        T,
        Source,
        Target,
        Fields extends Schema.Struct.Fields,
    > {
        new RelationClass(
            _: never,
        ): Endpoints<Source, Target> & T & OfKind<Relation>;
        "~@dxos/echo/Kind": Type;
        "~@dxos/echo/SchemaKind": Relation;
        "~@dxos/echo/Type.Instance"?: Endpoints<Source, Target> & Self & OfKind<
            Relation,
        >;
        "~@dxos/echo/Type.StaticSchema": Codec<any, any>;
        fields: Fields;
        id: string;
        jsonSchema: JsonSchemaType;
        name?: string;
    }

    Type Parameters

    • Self
    • T
    • Source
    • Target
    • Fields extends Schema.Struct.Fields

    Hierarchy (View Summary)

    Index

    Constructors

    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": Relation

    Schema-kind brand (relation).

    "~@dxos/echo/Type.Instance"?: Endpoints<Source, Target> & Self & OfKind<
        Relation,
    >
    "~@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