@dxos/client
    Preparing search index...

    Variable relationConst

    relation: <SourceSchema extends AnyNoContext, TargetSchema extends AnyNoContext>(
        opts: EchoRelationSchemaOptions<SourceSchema, TargetSchema>,
    ) => <Self extends Any>(
        self: Self,
    ) => Type.Relation<Type<Self>, Type<SourceSchema>, Type<TargetSchema>>

    Factory function to create an ECHO relation schema. Adds relation metadata annotations to an Effect schema.

    Type declaration

    const WorksFor = Schema.Struct({
    role: Schema.String,
    }).pipe(Type.relation({
    typename: 'example.com/type/WorksFor',
    version: '0.1.0',
    source: Person,
    target: Company,
    }));