-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Take another sweep for known globals #3805
Comments
Folks at TypeScript generate comprehensive files: https://github.com/microsoft/TypeScript/blob/master/lib/lib.dom.d.ts https://github.com/microsoft/TypeScript/blob/master/lib/lib.es5.d.ts that one contains basic globals, around 40 of them. Anyway https://github.com/microsoft/TypeScript/tree/master/lib directory contains various language editions and README with info related to how they collect those declarations. This is very interesting, I had no idea global namespace is so large |
That is a heckin' lot of declarations! 😅 The difference though seems to be that the TypeScript crew needs to have declarations for all ECMAScript objects and functions and whatnot to be able to provide proper typing when using those things in your TypeScript code. In Svelte, we only need to declare the names of globals so that Svelte knows what objects and functions are actually declared when compiling the code. But maybe it would make sense for Svelte to also check functions and other declarations nested on global objects as well. 🤔I feel like that's an entirely different discussion though. 🤷♂️ And please correct me if I'm wrong here. |
Gives 917 in latest Chrome. The last ~25 are injected by Dev Tools. |
I'm getting warnings doing normal event handler things referring to HTMLInputElement and friends, because they're not in the list. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
#7786 registered all global objects / functions. |
(Opening in favor of sveltejs/rollup-plugin-svelte#73)
Our list of known globals is still somehow missing
Event
. We should probably take another sweep (through MDN? somewhere else?) for a list of the the most famous ones and add them to the set here.The text was updated successfully, but these errors were encountered: