Let be a space, a dense subspace, a compact Hausdorff space and be any continuous map. If for all disjoint closed we have , then there is a continuous extension of to .
A.D. Taĭmanov, О распространении непрерывных отображений топологических пространств (On extension of continuous mappings of topological spaces.) Mat. Sbornik N.S. 31(73), (1952). 459–463. mathnet.ru page
The result is stated, for instance, as Theorem 3.2.1 in