5 ms·
You lose the usefulness of IDE argument typehints (now you just get a [Object] requirement) and still need to look somewhere to know which parameters are requir
by dreyfan 5y ago
You lose the usefulness of IDE argument typehints (now you just get a [Object] requirement) and still need to look somewhere to know which parameters are required and which are optional in your object. And if you mistype the key/tag, nothing tells you about it.
Pass descriptively named variables instead imo.
- koolba 5y agoUsing TypeScript solves all of those problems at compile time with full IDE support. Descriptive names are not a solution when the data types are the same. It’s just as easy to mix up the parameters of the same type.
- easton_s 5y agoHeck intellij will give you parameter object property names with plain javascript with no JSDoc.