typescript!

converting code to typescript
le more typescript!