update comment.js to TypeScript