  We study universal properties of the torus partition function of $T\bar
T$-deformed CFTs under the assumption of modular invariance, for both the
original version, referred to as the double-trace version in this paper, and
the single-trace version defined as the symmetric product orbifold of
double-trace $T\bar T$-deformed CFTs. In the double-trace case, we specify
sparseness conditions for the light states for which the partition function at
low temperatures is dominated by the vacuum when the central charge of the
undeformed CFT is large. Using modular invariance, this implies a universal
density of high energy states, in analogy with the behavior of holographic
CFTs. For the single-trace $T\bar T$ deformation, we show that modular
invariance implies that the torus partition function can be written in terms of
the untwisted partition function and its modular images, the latter of which
can be obtained from the action of a generalized Hecke operator. The partition
function and the energy of twisted states match holographic calculations in
previous literature, thus providing further evidence for the conjectured
holographic correspondence. In addition, we show that the single-trace
partition function is universal when the central charge of the undeformed CFT
is large, without needing to assume a sparse density of light states. Instead,
the density of light states is shown to always saturate the sparseness
condition.
