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

Readonly<TypedArray> lacks Symbol properties #42681

Closed
ghost opened this issue Feb 7, 2021 · 2 comments
Closed

Readonly<TypedArray> lacks Symbol properties #42681

ghost opened this issue Feb 7, 2021 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 7, 2021

Bug Report

🔎 Search Terms

readonly, missing symbol property, readonly typedarray

🕗 Version & Regression Information

  • This is the behavior in every version I tried

⏯ Playground Link

Playground link with relevant code

💻 Code

const broken: Readonly<Uint8Array> = Uint8Array.of(1, 2, 3, 4);

broken[Symbol.iterator] // non-existant

const working: Uint8Array = Uint8Array.of(1, 2, 3, 4);

working[Symbol.iterator] // okay

🙁 Actual behavior

TS claims that Symbol.iterator and Symbol.toStringTag do not exist on Readonly.

🙂 Expected behavior

Code transpiled without error, Symbol.iterator has the same type on Readonly as it does on Uint8Array.

@MartinJohns
Copy link
Contributor

Looks like a duplicate of #37182. Used search terms: readonly array symbol

@ExE-Boss
Copy link
Contributor

ExE-Boss commented Feb 7, 2021

This will be fixed by #42543

@ghost ghost closed this as completed Feb 7, 2021
This issue was closed.
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

2 participants