(
component: T,
state: Partial<InstanceState> = {},
)
| 7 | |
| 8 | /** Create the instance with the provided sate and attach the component to it. */ |
| 9 | export function prepareInstance<T extends Container | Filter | HostConfig['instance']>( |
| 10 | component: T, |
| 11 | state: Partial<InstanceState> = {}, |
| 12 | ) |
| 13 | { |
| 14 | const instance = component as HostConfig['instance']; |
| 15 | |
| 16 | instance.__pixireact = Object.assign({ |
| 17 | filters: [], |
| 18 | parent: null, |
| 19 | root: null as unknown as HostConfig['containerInstance'], |
| 20 | type: '', |
| 21 | }, state); |
| 22 | |
| 23 | return instance; |
| 24 | } |
no outgoing calls
no test coverage detected