The obvious solution would be to declare an interface for these objects, and then use this interface for the type instead of repeating the object declaration every time. In case of nested objects with lots of properties, this become long, verbose, repetitive… and mainly just a pain to read and maintain. Now that I’ve got it working, I am constantly looking for ways to improve it and make it even more powerful and useful.įor example, TypeWiz can figure out the shape of complex objects (i.e., what properties they have), but if you had multiple places in the code where you pass a complex object, TypeWiz currently repeats the same object definition multiple times. I’ll Give You a Hint: You Can Do Some Pretty Amazing Things With BigQuery…Ī few months ago, I created TypeWiz, a tool that helps migrating large code bases to TypeScript by trying to add missing type annotations automatically.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |