Skip to content

Conversation

@nbogie
Copy link
Contributor

@nbogie nbogie commented Nov 26, 2025

Resolves #8302

Changes:
adds a final export default p5 to global.d.ts when it's prepared in typescript.mjs

changes one of the type tests (test/types/basic.js) to use this default import.

Prepared following @davepagurek 's instruction. (Thanks!)

PR Checklist

  • npm run lint passes
  • Unit tests are included / updated

@nbogie
Copy link
Contributor Author

nbogie commented Nov 28, 2025

Also tested the fix successfully with a couple of p5 global-mode typescript projects, locally, including this non-trivial one.

Process:

used npm pack on the patched p5 code, and and
then in my test projects ran npm install that-new-p5.tgz in place of p5 from npm.
Changed those projects to use import p5 from "p5/global".
Both type-checked and ran fine.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant