Type alias Relation<GraphSchema, From, Name, FromSchema, To, Schema>
Relation
<GraphSchema, From, Name, FromSchema, To, Schema>: { [ K in keyof Schema]: Schema[K] } & { $delete
: (() => Promise<void>); $from
: (() => Promise<Vertex<GraphSchema, From>>); $id
: string; $schema
: Schema; $self
: (() => Promise<Relation<GraphSchema, From, Name>>); $to
: (() => Promise<Vertex<GraphSchema, To>>); $update
: ((props
: Partial<Schema>) => Promise<Relation<GraphSchema, From, Name>>); }
Type Parameters
-
GraphSchema extends FullGraph
-
From extends keyof GraphSchema
-
Name extends keyof GraphSchema[From]
-
FromSchema extends GraphSchema[From] = GraphSchema[From]
-
To extends FromSchema[Name] extends RelationShape<infer Many, infer To> ? To : never = FromSchema[Name] extends RelationShape<infer Many, infer To> ? To : never
-
Schema extends FromSchema[Name] extends RelationShape<infer Many, infer To, infer Schema> ? Schema : never = FromSchema[Name] extends RelationShape<infer Many, infer To, infer Schema> ? Schema : never