type HostInterface = {
schedule: (
fiber: LiveFiber<any>,
task?: MaybeTask,
) => void,
flush: () => void,
track: (
fiber: LiveFiber<any>,
task: Task,
) => void,
untrack: (
fiber: LiveFiber<any>,
task: Task,
) => void,
dispose: (fiber: LiveFiber<any>) => void,
depend: (
fiber: LiveFiber<any>,
root: number,
) => boolean,
undepend: (
fiber: LiveFiber<any>,
root: number,
) => void,
traceDown: (
fiber: LiveFiber<any>,
) => LiveFiber<any>[],
traceUp: (fiber: LiveFiber<any>) => number[],
visit: (fiber: LiveFiber<any>) => void,
unvisit: (fiber: LiveFiber<any>) => void,
pop: () => LiveFiber<any> | null,
peek: () => LiveFiber<any> | null,
reorder: (fiber: LiveFiber<any>) => void,
depth: (d: number) => void,
slice: (d: number) => boolean,
id: () => number,
__stats: {
mounts: number,
unmounts: number,
updates: number,
dispatch: number,
},
__ping: (
fiber: LiveFiber<any>,
active?: boolean,
) => void,
__highlight: (
id: number | null,
active?: boolean,
) => void,
}
packages / live / src / types.ts