get rid of Symbol iterator in autocomplete
Hi TS nerds, I'm in dire need of help;
For a bit of context, I have a function that returns a tuple:
const [hej, do] = myFunc()
, and I'm looking to allow an object being returned by the same function: const obj = myFunc() // obj.hej and obj.do exist
. for WAY more accurate code, see: https://github.com/bdsqqq/try/pull/10
My solution of choice rn would be:
But this makes the autocomplete of the object include data, error AND Symbol...
Is there any way to not have Symbol
there??1 Reply
A proposed solution was:
But this makes the destructures look like like
[[data, error]]
Fineeeeeeee, the symbol iterator is supposed to be there, removing it would be lying to the user