(type: string, props: Props)
| 9 | |
| 10 | // export const createInstance = (type: string, props: any): Instance => { |
| 11 | export const createInstance = (type: string, props: Props): Instance => { |
| 12 | // TODO 处理props |
| 13 | const element = document.createElement(type) as unknown; |
| 14 | updateFiberProps(element as DOMElement, props); |
| 15 | return element as DOMElement; |
| 16 | }; |
| 17 | |
| 18 | export const appendInitialChild = ( |
| 19 | parent: Instance | Container, |
no test coverage detected