export const innerHTMLSink = (node) => (html) => node.innerHTML = html;
export const appendHTMLSink = (node) => {
    // const append = (str: string) => node.insertAdjacentHTML('beforeEnd', str)
    const appendFn = node.insertAdjacentHTML.bind(null, 'beforeEnd');
    return (html) => {
        html.subscribe?.(appendFn) ?? html.then?.(appendFn) ?? appendFn(html ?? '');
        // if(typeof html == 'object') {
        //     appendFn(JSON.stringify(html))
        // }
    };
};
export const innerTextSink = (node) => (str) => node.innerText = str;
export const textContentSink = (node) => (str) => node.textContent = str;
