question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add Symbol.toStringTag to promise instance

See original GitHub issue

As for now, promise created by Bluebird does not have Symbol.toStringTag, but have toString method which returns "[object Promise]" string. Having [Symbol.toStringTag]: "Promise" make Object.prototype.toString.call(promise) to return same string: "[object Promise]" (as for now it will return "[object Object]" string. So, I suggest to add Symbol.toStringTag property to bluebird’s promise prototype.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:52
  • Comments:7

github_iconTop GitHub Comments

11reactions
benjamingrcommented, Jun 12, 2018

I don’t understand why you think bluebird is incompatible with native promises in TypeScript - I’ve been happily using them together for quite a while. That fact is unrelated to how toStringTag behaves.

9reactions
torkelrogstadcommented, Jun 12, 2018

The fact that Bluebird promises and native ES6 promises are incompatible makes it very difficult to work with packages like Sequelize in TypeScript. Please consider implementing this change.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Symbol.toStringTag - JavaScript - MDN Web Docs
toStringTag well-known symbol is a string valued property that is used in the creation of the default string description of an object. It...
Read more >
Symbol.toStringTag - JavaScript - UDN Web Docs: MDN Backup
The Symbol.toStringTag well-known symbol is a string valued property that is used in the creation of the default string description of an object....
Read more >
JavaScript | Symbol.toStringTag symbol - GeeksforGeeks
The Symbol.toStringTag is a well-known symbol and string valued property in JavaScript which is used in the creation of the default string ...
Read more >
ES6 Promise / Typescript and the Bluebird Promise
I was dealing with. TS2322: Type 'Bluebird' is not assignable to type 'Promise'. Property '[Symbol.toStringTag]' is missing in type ...
Read more >
CustomStore - The "Property '[Symbol.toStringTag]' is missing ...
toStringTag ]' is missing in type Promise<TEntity, any, ... you need to implement the data access logic in the CustomStore instance.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found