-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open
Labels
Description
Most appropriate sub-area of p5.js?
- Accessibility
- Color
- Core/Environment/Rendering
- Data
- DOM
- Events
- Image
- IO
- Math
- Typography
- Utilities
- WebGL
- Build process
- Unit testing
- Internationalization
- Friendly errors
- Other (specify if possible)
p5.js version
2.2.2
Web browser and version
not applicable
Operating system
not applicable
Steps to reproduce this
Steps:
- Setup https://typescript-eslint.io/
- Use
tseslint.configs.strictTypeCheckedbase config or enable thetypescript-eslint/no-misused-promisesrule
Snippet:
new p5((p) => {
p.setup = async () => { // eslint error: Promise-returning function provided to variable where a void return was expected
await loadImage("/img.jpg")
}
}Suggestion:
i think the fix would just be to add this JSDoc line to setup():
* @return {void|Promise<void>}Reactions are currently unavailable