Catalyzes the formation of dTDP-glucose, from dTTP and glucose 1-phosphate, as well as its pyrophosphorolysis. alpha-D-glucose 1-phosphate + dTTP + H(+) = diphosphate + dTDP-alpha-D-glucose Binds 1 Mg(2+) ion per subunit. Optimum pH is 8.0-8.5. Active from pH 6.0 to 10.0. Carbohydrate biosynthesis; dTDP-L-rhamnose biosynthesis. Bacterial outer membrane biogenesis; LPS O-antigen biosynthesis. Homotetramer. Both catalyzed reactions, i.e. dTDP-glucose biosynthesis and pyrophosphorolysis, follow a sequential ordered bi-bi catalytic mechanism. Belongs to the glucose-1-phosphate thymidylyltransferase family. Most extant K-12 lines do not express O-antigen because of mutations in dTDP-rhamnose biosynthetic genes or in the rhamnosyltransferase gene wbbL.