function debounce(func, wait) {
	let timeout;
	const debouncedFunc = (args) => new Promise((resolve) => {
		if (timeout) clearTimeout(timeout);
		timeout = setTimeout(() => {
			resolve(func(args));
		}, wait);
	});
	const teardown = () => {
		if (timeout) clearTimeout(timeout);
	};
	return [debouncedFunc, teardown];
}
export { debounce as t };

//# sourceMappingURL=debounce.js.map