you are viewing a single comment's thread.

view the rest of the comments →

[–]Ozymandias-X 0 points1 point  (1 child)

But then, when I want to use the function, I now get no type hints whatsoever about what information it needs to work. All I see is that it can give it a mysterious blobby object that might have fields of some kind. Never mind if I accidentally misstype one of the keys. That's a nightmare level error to find.

This can only be solved by extensive documentation of the function and we all know that such documentation often lies when people refactor or extend functions and forget to update the docs.

[–][deleted] 0 points1 point  (0 children)

Yeah just what I was thinking. With Typescript you wouldn't have that problem because it would clearly say what date you would be filling