Closed fisker closed 1 year ago
It seems weird to have these on Object instead of Promise, since they produce a Promise, not an Object.
It does not solve problems that should solve this proposal and it could cause many new potential bugs - for example, order with integer keys.
Or this is a bug in the names of keys in the first example?
integer keys have a defined ordering in object keys; can you elaborate?
(the first example with integer key)
const {
one,
two,
} = await Object.resolveValues({
foo: Promise.resolve(1),
1: Promise.resolve(2),
});
How should it work?
oh, in that case the example's just wrong :-) it'd need to be:
const {
1: one,
foo: two,
} = await Object.resolveValues({
foo: Promise.resolve(1),
1: Promise.resolve(2),
});
(depending on which was meant to be which)
In this case, it's just a name option for #7.
True enough.