What do you think about using a single object parameter with properties rather than having a function that has eg 5 parameters. I feel like the object has a better DX especially if some of the params are optional. I am not a fan of passing undefined for empty params.
-
-
Replying to @elmd_
Definitely a thing to consider when writing the function: - can it grow past 2 or 3 params? - can any of the first params be null or undefined? If 'yes' to either question - better use an object.
1 reply 0 retweets 5 likes -
-
Replying to @elmd_
And - for those who want to give
@WebStormIDE a try - it has a built-in intention to convert a tuple of params into an object. Option-Enter over the function's declaration, and voilà - it converts both the signature and the invocations.pic.twitter.com/fHJDt9PxRT
1 reply 0 retweets 2 likes -
Replying to @PanamCode @WebStormIDE
So does WebStorm still have a noticeable lag when you fix some red squiggly lines? I saw that pretty often that when you fix an import for example it took 1-2 seconds for the red line to disappear. That's not snappy :D
2 replies 0 retweets 1 like
Hi, if you're still experiencing this lag, please share a specific example/project where it keeps happening so we could reproduce the issue and investigate it further. Here is the link to our issue tracker: http://youtrack.jetbrains.com/issues/WEB
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.