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

State of Typescript declarations #5247

Closed
1 of 17 tasks
cupcakearmy opened this issue May 14, 2021 · 3 comments
Closed
1 of 17 tasks

State of Typescript declarations #5247

cupcakearmy opened this issue May 14, 2021 · 3 comments

Comments

@cupcakearmy
Copy link

How would this new feature help increase access to p5.js?

Actual typings help a ton since we can get autocompletions, code checking, function parameter guide, etc. Even if the user does not actually use typescript typings help a lot in editors like vscode where that information is used regardless if the actual language is js or ts.

Most appropriate sub-area of p5.js?

  • Accessibility (Web Accessibility)
  • Build tools and processes
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Friendly error system
  • Image
  • IO (Input/Output)
  • Localization
  • Math
  • Unit Testing
  • Typography
  • Utilities
  • WebGL
  • Other (specify if possible)

Feature enhancement details:

There was a PR (#2279) and a related issue (#1392) about this that seemed merged. However in the bundle for the latest version 1.3.1 there is no sign of declaration files. The latest @types/p5 0.9.1 (probably outdated rn?) are not really usable and do not provide meaningful information as the instance mode is simply set to any.

Is there something in the pipeline? I think it would greatly increase the quality of the project 🙂

@welcome
Copy link

welcome bot commented May 14, 2021

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.

@cupcakearmy cupcakearmy changed the title Sate of Typescript declarations State of Typescript declarations May 14, 2021
@limzykenneth
Copy link
Member

@cupcakearmy The typescript definitions for p5.js (which is also the one published at @types/p5) is not maintained in this repo or under the processing organization but instead as a mostly volunteer run repo here. I'm not familiar with their current status so if there's specific out of date related issues, you should probably file it there.

We also don't bundle typescript definitions with the overall p5.js bundle because we are not the one maintaining it so it can go out of date, in addition to us not having expectation of beginners using the typescript definitions and potentially get confused by the existence of the definition files.

@cupcakearmy
Copy link
Author

Yeah it does not make sense to ship them if they are not coming from the source of course.
That's a pity, as beginner to p5 types would have helped me a ton, but for "non programmers" it might be confusing :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants