the cells collection to infer from, usually typeof cells
import type { InferLink } from '@joint/react';
const cells = [
{ id: 'a', type: 'element', data: { label: 'A' } },
{ id: 'e', type: 'link', source: { id: 'a' }, target: { id: 'b' }, data: { weight: 2 } },
] as const;
type Edge = InferLink<typeof cells>; // link variant of the union
type EdgeData = InferLink<typeof cells>['data']; // { weight: 2 }
Infer the link record type from a cells collection, the link counterpart of InferElement. Selects the member whose
typeis'link'.