Feature of the Promise.prototype.chain method in chrome

method in a chrome browser named Promise.prototype.chain. I can not find documentation about this method. Does anyone know anything about this?

btw can I find google chrome documentation for all methods in a browser?

+5
source share
1 answer

Note. Now .chain is just a deprecated alias for then .


What chain does is basically what then does, except that it doesn't decompress promises. The chain is the correct "monadic flat map", not then , which automatically decompresses promises.

Discussed over long distances on the mailing list and at TC meetings. It was decided against.

.chain is just a religion of the past in Chrome, it may be released in a future release, but no one currently advocates for an offer, including it. I would not use it in production.

+3
source

Source: https://habr.com/ru/post/1240308/


All Articles