This is not valid answer. Arrays can be subclassed too, but (1,Array.of)(2,3
) returns instance of Array.

On Sat, Feb 2, 2019 at 10:20 PM Logan Smyth <[email protected]> wrote:

> `Promise` can be subclassed, so the `this` context for `resolve` affects
> what class is instantiated.
>
> On Sat, Feb 2, 2019 at 12:25 PM Sultan <[email protected]> wrote:
>
>> Was there any reason Promise.resolve was not afforded the ability to
>> dispatch outside of `this` pointing to the `Promise` constructor?
>>
>> For example:
>>
>> const {resolve} = Promise
>> resolve(1234)
>>
>> This currently throws.
>> _______________________________________________
>> es-discuss mailing list
>> [email protected]
>> https://mail.mozilla.org/listinfo/es-discuss
>>
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to