Involved in the synthesis of both phthiocerol dimycocerosates (PDIMs) and phenolic glycolipids (PGLs), which are structurally related lipids non-covalently bound to the outer cell wall layer of M.tuberculosis and are important virulence factors. a fatty acyl-CoA + H2O = a fatty acid + CoA + H(+) Belongs to the thioesterase family.