We present a many-body formalism for the simulation of time-resolved nonlinear spectroscopy and apply it to study the coherent interaction between excitons and trions in doped transition-metal dichalcogenides. Although the formalism can be straightforwardly applied in a first-principles manner, for simplicity we use a parameterized band structure and a static model dielectric function, both of which can be obtained from a calculation using the $GW$ approximation. Our simulation results shed light on the interplay between singlet and triplet trions in molybdenum- and tungsten-based compounds. Our two-dimensional electronic spectra are in excellent agreement with recent experiments and we accurately reproduce the beating of a cross-peak signal indicative of quantum coherence between excitons and trions. Although we confirm that the quantum beats in molybdenum-based monolayers unambigously reflect the exciton-trion coherence time, they are shown here to provide a lower-bound to the coherence time of tungsten analogues due to a destructive interference emerging from coexisting singlet and triplet trions.