I'm a beginner with JavaScript and TypeScript and I'm starting work on a simple internal tool. Since I'll be heavily using AI in this project, I'm wondering whether I should go with JavaScript or TypeScript. I've heard that TypeScript can help catch bugs and keep things tidy, but I'm concerned it might be too complex and slow me down. As a solo developer, I'm not too keen on following best practices just for the sake of it. What do you all recommend?
5 Answers
Starting with TypeScript can be a good call. Even if you find some bugs later, it’ll be easier to manage than switching over to it later. Plus, using TypeScript can actually enhance your AI integration by providing better context. If you ever feel lost, you can 'ts-ignore' specific lines and still write plain JavaScript when needed.
I'd definitely recommend using TypeScript! It can be a bit overwhelming at first, but it helps you avoid those frustrating moments when something's not working due to unexpected type changes. If you're coding intuitively, TypeScript gives you that added safety net.
If you need to whip up something fast, JavaScript is definitely quicker to get going since it has no setup hassles. But, if your tool will start interacting with more structured data, you'll quickly find TypeScript pays off, especially with AI to help prevent silent bugs.
I'm all for TypeScript! Yes, it means a bit of extra boilerplate, but it saves you from a lot of development headaches later. Since you're using AI, you'll find that TypeScript helps with more accurate suggestions by understanding your data structures better.
If you're working alone on this tool, TypeScript might slow down your pace a bit upfront, but it will likely save you time by catching issues early on. Just think, will anyone else work on this tool in the future? If yes, TypeScript will make life easier for them too.

True, I've found using TypeScript keeps the project organized and helps avoid bugs. Plus, the AI suggestions can be more on point because TypeScript recognizes the types!