fix build error in ts