Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add [Symbol.toStringTag] property to all interfaces #1762

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

petamoriken
Copy link
Contributor

Fixes #1641
Past PR #1699

Copy link
Contributor

Thanks for the PR!

This section of the codebase is owned by @saschanaz - if they write a comment saying "LGTM" then it will be merged.

@saschanaz
Copy link
Contributor

I wonder we should instead have WebIDLInterface interface with toStringTag and let others extend it. Doing so could just fold the extra member in existing .iterable.d.ts without extra files. (because .iterable.d.ts is effectively for es2015 which introduced toStringTag). This would allow easier change when the Web IDL spec ever adds any other well-known symbol in interface binding.

// dom.generated.d.ts
interface WebIDLInterface {}

interface AbortSignal extends WebIDLInterface {} // Let others extend it

// dom.iterable.generated.d.ts - augment the interface
interface WebIDLInterface { /* */ } 

@petamoriken
Copy link
Contributor Author

IMHO, it's weird to have unrelated types in *.iterable.d.ts, so separate files is better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Symbol.toStringTag is missing on File, Blob and FormData
3 participants