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

Better JSDoc types #6726

Closed
wants to merge 58 commits into from
Closed

Conversation

mybearworld
Copy link
Contributor

@mybearworld mybearworld commented Oct 1, 2023

Resolves #6488
Closes ScratchAddons/website-v2#337
Part of #6721

Changes

Improved the JSDoc types and grammar, and also added the JSDoc types to every addon.

Reason for changes

Better DX.

Tests

Tested in VSCode - browser testing isn't really applicable here

@Samq64 Samq64 added scope: documentation Related to documentation and help resources type: enhancement New feature for the project scope: development Related to developing, documentation, DevEx, etc. labels Oct 1, 2023
@mybearworld
Copy link
Contributor Author

Related: ScratchAddons/website-v2#337

@WorldLanguages
Copy link
Member

Sorry for not checking this before, I will try to find some time next month.

@WorldLanguages WorldLanguages added this to the v1.37.0 milestone Feb 18, 2024
@mybearworld
Copy link
Contributor Author

Should be up to date now

@WorldLanguages
Copy link
Member

Maybe I can take a look for v1.41, I don't have enough time to do it before that

@WorldLanguages WorldLanguages removed this from the v1.40.0 milestone Aug 21, 2024
@Samq64 Samq64 added this to the v1.41.0 milestone Aug 21, 2024
@Samq64
Copy link
Member

Samq64 commented Oct 12, 2024

Indeed, there's no other way to define the argument types, as far as we know. If addon was a global object, it would be easier.

Does __addon now being available globally help anything?

@mybearworld
Copy link
Contributor Author

Does __addon now being available globally help anything?

Addons still get in their own addon (and msg and console) as function parameters, so I don't think so.

Copy link

@Supernoodles99 Supernoodles99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

engineer gaming

@mybearworld mybearworld closed this by deleting the head repository Dec 1, 2024
@mybearworld
Copy link
Contributor Author

I accidentally deleted my fork. New PR is at #7969

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: development Related to developing, documentation, DevEx, etc. scope: documentation Related to documentation and help resources type: enhancement New feature for the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JSDoc types for userscript function parameters
7 participants