I had been struggling with creating schemas for objects and aligning those objects with the Firebase Firestore fields. Typescript had been on my radar for some time, but I hadn't worked with it before.
I come from a C# background where OOP is king. Moving into Javascript, I wanted to fully embrace the Prototypical Inheritance model rather than using the syntactic sugar of classes. My solution was to use Typescript as a way to simply ensure that customs objects and functions were passed the correct data.
Typescript was really easy to integrate into the project. Vue 3.x is written fully in Typescript so it has excellent support. All I had to do was run vue add typescript
and the rest was straightforward. Obviously I had to learn some of the special keywords that Typescript has, but I am quite familiar with the pattern of using Interfaces.
Now my code base is much more scalable and I won't be worrying that I passed the wrong data type into a function. Just like with Javascript, there are good parts and bad parts. The key is to learn the differences and keep moving forward.