add `export default p5` at end of global.d.ts by nbogie · Pull Request #8299 · processing/p5.js
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.