Converted JS file to typescript..