I'd love to see a type-safe return value from the multi() method on various APIs. I know this is easier said than done — I can't think of a way to do it when passing an array of selection strings — but I there are other ways it could work. Something like:
await torn.user.multi().basic().battlestats().attacks().fetch();
Or:
await torn.user.multi(request => request.basic().battlestats().attacks());
Or with a little ingenuity I think even this could work:
await torn.user.basic().battlestats().attacks();
What do you think? If you're interested, I'd be up for working on a PR.
I'd love to see a type-safe return value from the
multi()method on various APIs. I know this is easier said than done — I can't think of a way to do it when passing an array of selection strings — but I there are other ways it could work. Something like:Or:
Or with a little ingenuity I think even this could work:
What do you think? If you're interested, I'd be up for working on a PR.