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

A comment including an obsolete spec: StringView #1909

Open
seia-soto opened this issue Feb 9, 2025 · 0 comments
Open

A comment including an obsolete spec: StringView #1909

seia-soto opened this issue Feb 9, 2025 · 0 comments

Comments

@seia-soto
Copy link

While playing with TextEncoder and TextDecoder, I found that the comments for those APIs were completely obsolete and may mislead the direction: For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays.

https://github.com/seia-soto/TypeScript-DOM-lib-generator/blob/main/inputfiles/mdn/apiDescriptions.json#L386-L387

{
...
"TextDecoder": "The TextDecoder interface represents a decoder for a specific method, that is a specific character encoding, like utf-8, iso-8859-2, koi8, cp1261, gbk, etc. A decoder takes a stream of bytes as input and emits a stream of code points. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays.",
"TextEncoder": "TextEncoder takes a stream of code points as input and emits a stream of bytes. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays.",
...
}

It's generated from 2214698 and outdated.

From #1841, unfortunately it looks like there's no system for automatic update on that file holding MDN descriptions. However, the README indicates that you shouldn't manually edit that file.

- `mdn/apiDescriptions.json`: a JSON file generated by fetching API descriptions from [MDN](https://developer.mozilla.org/en-US/docs/Web/API). **Do not edit this file**.

By any chance, would you allow updating those lines manually? I assume building an automated system to update those lines will require pretty much of effort and time.

I'm also leaving some related documents regarding StringView here. By looking at those, I believe the whole spec concluded in encoding spec.

refs mdn/content#282
refs https://github.com/search?q=repo%3Amdn%2Ftranslated-content%20stringview&type=code
refs https://developer.mozilla.org.cach3.com/en-US/docs/Code_snippets/StringView

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