MCPcopy
hub / github.com/clientIO/joint / createElements

Function createElements

packages/joint-react/src/utils/create.ts:37–42  ·  view source on GitHub ↗
(items: Array<Element & ElementWithAttributes<Type>>)

Source from the content-addressed store, hash-verified

35 * ```
36 */
37export function createElements<
38 Element extends GraphElement,
39 Type extends string | undefined = 'react',
40>(items: Array<Element & ElementWithAttributes<Type>>): Array<Element & RequiredElementProps> {
41 return items.map((item) => ({ ...item })) as Array<Element & RequiredElementProps>;
42}
43
44/**
45 * Infer element based on typeof createElements

Callers 15

port-item.tsxFile · 0.90
generateRandomElementsFunction · 0.90
paper.test.tsxFile · 0.90
create.test.tsFile · 0.90
code.tsxFile · 0.90
code.tsxFile · 0.90
code.tsxFile · 0.90
code.tsxFile · 0.90

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected