(type, props, ...children)
| 1 | (function() { |
| 2 | function createElement(type, props, ...children) { |
| 3 | return { |
| 4 | type, |
| 5 | props: { |
| 6 | ...props, |
| 7 | children: children.map((child) => { |
| 8 | const isTextNode = typeof child === "string" || typeof child === "number"; |
| 9 | return isTextNode ? createTextNode(child) : child; |
| 10 | }), |
| 11 | }, |
| 12 | }; |
| 13 | } |
| 14 | |
| 15 | function createTextNode(nodeValue) { |
| 16 | return { |
nothing calls this directly
no test coverage detected