typescript implementation of dotxhr