Add TypeScript type annotations to JavaScript functions for better type safety and IDE support. JS to TypeScript is a free online tool from the ToolsRift JavaScript Tools collection. It runs entirely in your browser — nothing to install, no signup, and your data never leaves your device.
The tool adds basic type annotations to function parameters and return types, converts var to let/const, and adds interface suggestions.
The output is a starting point. You'll need to refine types, add generics, and handle edge cases for production TypeScript code.
Basic TypeScript knowledge helps. The tool generates simple type annotations that you can then customize and improve.