Generalised residuals, as defined by Cox and Snell, may be thought of as residuals from generalised regression. Under regularity conditions on the regression and on the estimator of the unknown parameters, the asymptotic behaviour of the empirical distribution of these residuals is determined. The addition of a random adjustment to the maximum likelihood estimator leads to the familiar Brownian bridge as the limit.
"The Empirical Distribution Function of Residuals from Generalised Regression." Ann. Statist. 8 (2) 285 - 298, March, 1980. https://doi.org/10.1214/aos/1176344954