function bind_element_size(element, type, set) {
	var unsub = resize_observer_border_box.observe(element, () => set(element[type]));

	effect(() => {
		// The update could contain reads which should be ignored
		untrack(() => set(element[type]));
		return unsub;
	});
}
@param {HTMLElement} element
@param {'clientWidth' | 'clientHeight' | 'offsetWidth' | 'offsetHeight'} type
@param {(size: number) => void} set