convereted some files into TypeScript