3 ms·
Callback hell, and a general lack of types. I have has a misfortune of spending today writing a test assignment for a company that still uses vanilla JS, witho
by golergka 3y ago
Callback hell, and a general lack of types.
I have has a misfortune of spending today writing a test assignment for a company that still uses vanilla JS, without promises or declaration files. Felt right back in 2012 when I first tried node. Worked around the requirement of using JS by utilising JSDoc, but still — it was much worse than I remembered.
- eyelidlessness 3y agoFor future reference if you ever need to do it again, @callback is roughly equivalent to @typedef but for defining function types, and @template is generic type params for both. It’s not a good TS replacement whatever anyone might tell you, but it’s a reasonable approximation of what you might need in a pinch.