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

Promise<FrozenArray<T>> should become Promise<sequence<T>> #1722

Open
domenic opened this issue Jun 26, 2024 · 0 comments
Open

Promise<FrozenArray<T>> should become Promise<sequence<T>> #1722

domenic opened this issue Jun 26, 2024 · 0 comments

Comments

@domenic
Copy link
Contributor

domenic commented Jun 26, 2024

A few methods, namely:

  • Clients's matchAll()
  • Cache's matchAll() and keys()
  • ServiceWorkerContainer's getRegistrations()

return Promise<FrozenArray<T>>.

As discussed in whatwg/webidl#1399, it doesn't really make sense to return frozen arrays as return values. The caller should just get back a sequence<T>.

It would be nice to clean this up so that the Web IDL spec can disallow using FrozenArray<T> in such scenarios.

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

No branches or pull requests

1 participant