-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
doc: mark global object as legacy #47819
Conversation
Considered legacy by whom? |
I tried to do it based on the comments in the issue, I may be lacking in this regard, sorry @benjamingr |
@benjamingr I don't know if the original proposal tried to use I think it's good to discourage developers from using it and a doc deprecation is a good thing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a formal deprecation. As Ben said in #47784, we might never be able to warn about usage at runtime yet alone remove it. I am not convinced that formally deprecating this API helps.
We could mark it as legacy. Or we could just add a sentence saying that new applications should consider using globalThis
for improved compatibility with other runtimes.
yes i will update it that way if appropriate |
I was thinking more like how all the other docs do it, take url parser for instant.
So maybe > Stability: 3 - Legacy. use globalThis instead. so that it gets a little legacy label too like this I also wouldn't mind if it where deprecated also. |
thanks for your suggestion i made an update |
global
objectglobal
object
Optional nit: the commit message is rather inaccurate. Consider changing the first commit message to something like this:
(Or ping me if you'd like me to do so.) |
global
object
cc @nodejs/tsc for visibility |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Landed in 33231b0 |
PR-URL: nodejs#47819 Fixes: nodejs#47784 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
doc: mark global object as legacy
Fixes: #47784