function collect_transitive_dependencies(binding, bindings) {
	if (bindings.has(binding)) {
		return;
	}
	bindings.add(binding);

	if (binding.kind === 'legacy_reactive') {
		for (const dep of binding.legacy_dependencies) {
			collect_transitive_dependencies(dep, bindings);
		}
	}
}
@param {Binding} binding
@param {Set<Binding>} bindings
@returns {void}