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

Add return types to documentation for expressions and functions #4609

Closed
1 task done
Pikachu920 opened this issue Feb 19, 2022 · 0 comments
Closed
1 task done

Add return types to documentation for expressions and functions #4609

Pikachu920 opened this issue Feb 19, 2022 · 0 comments
Labels
documentation Related to Skript's official documentation. enhancement Feature request, an issue about something that could be improved, or a PR improving something. PR available Issues which have a yet-to-be merged PR resolving it priority: low Issues that are not harmful to the experience but are related to useful changes or additions.

Comments

@Pikachu920
Copy link
Member

Suggestion

I am suggesting that we add return types to the documentation for expressions and functions

Why?

I think it could be useful to determine what type an expression returns. For example, the all groups expression returns a string but it might not be too far fetched for a scripter to think that there could be a dedicated group type. This would remove the ambiguity.

Other

Feel free to share your thoughts. I just thought of this idea and am not totally sure if it is actually worthwhile.

Agreement

  • I have read the guidelines above and confirm I am following them with this suggestion.
@TPGamesNL TPGamesNL added enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: low Issues that are not harmful to the experience but are related to useful changes or additions. documentation Related to Skript's official documentation. labels Feb 19, 2022
AyhamAl-Ali added a commit to AyhamAl-Ali/Skript that referenced this issue Feb 19, 2022
- Added `return type` for expressions and functions closes SkriptLang#4609
- Replaced new.html with docs.html which contains all the elements and `new` tab is a special case of docs.html with a special search filter
- Improved red box font color from black to background color (gray)
- Renamed `getNullOrEmptyDefault` method to `getDefaultIfNullOrEmpty` to make it clear
- Removed redundant assertions of `desc` and replaced them with one assertion in `handleIf` method as they should
- Added `Expression#getAcceptedChangeModes` to be used later for docs
@AyhamAl-Ali AyhamAl-Ali added the PR available Issues which have a yet-to-be merged PR resolving it label Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Related to Skript's official documentation. enhancement Feature request, an issue about something that could be improved, or a PR improving something. PR available Issues which have a yet-to-be merged PR resolving it priority: low Issues that are not harmful to the experience but are related to useful changes or additions.
Projects
None yet
Development

No branches or pull requests

3 participants