Closed
Description
Bug Report
π Search Terms
symbol.toStringTag, uint8array
π Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about extending builtins
β― Playground Link
Playground link with relevant code
π» Code
class Bytes extends Uint8Array {
get [Symbol.toStringTag]() {
return 'Bytes';
}
}
π Actual behavior
Property '[Symbol.toStringTag]' in type 'Bytes' is not assignable to the same property in base type 'Uint8Array'.
Type 'string' is not assignable to type '"Uint8Array"'
As far as I'm aware you can add Symbol.toStringTag
to any object.
π Expected behavior
No error