(items: Array<Element & ElementWithAttributes<Type>>)
| 35 | * ``` |
| 36 | */ |
| 37 | export 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 |
no test coverage detected