Try porting a very small bit of behavior into a new tiny library or module that is Typescript based and independently published. Enable the strictness checks in tsconfig - really, really resist the urge to use any, and enforce that any is disallowed in tsconfig. Familiarize yourself with its utility types that really trip new authors up. “Record” comes to mind here, and others that involve generics if you haven’t before worked with generics. Some of the type error messaging can be pretty obtuse - don’t be afraid to paste them into an LLM (or use Copilot enhanced Intellisense) to explain what it actually means. IMO the type violation messaging is a weak dev experience point for new authors, so don’t sweat it if you occasionally “struggle to make the squiggles go away”.
I’ve thought about moving to typescript. Do you have suggestions for a 20+ year JavaScript dev?
Try porting a very small bit of behavior into a new tiny library or module that is Typescript based and independently published. Enable the strictness checks in tsconfig - really, really resist the urge to use any, and enforce that any is disallowed in tsconfig. Familiarize yourself with its utility types that really trip new authors up. “Record” comes to mind here, and others that involve generics if you haven’t before worked with generics. Some of the type error messaging can be pretty obtuse - don’t be afraid to paste them into an LLM (or use Copilot enhanced Intellisense) to explain what it actually means. IMO the type violation messaging is a weak dev experience point for new authors, so don’t sweat it if you occasionally “struggle to make the squiggles go away”.
Just try it. You can usually convert a single file at a time. Start small (or even with a pet project)