3 ms·
{ then: (callback) => callback("foo") } Anything that has the same signature as a Promise. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/G
by anamexis 3y ago
{ then: (callback) => callback("foo") }
Anything that has the same signature as a Promise.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- culi 3y agoOkay, but nothing built in to the standard. In fact, even the docs you linked only point out that other implementations of Promises are "then-able". I guess I was under the impression that there were other, non-Promise, examples of thenables