updated for typescript 0.9