p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Processing. http://twitter.com/p5xjs —
So it adds an npm run types command which generates, currently, types/p5.rollup.esm.d.ts. The reason for the name is that:
Typescript does not work on our regular source files since we add to the same prototype across multiple files, and this does not seem to be something Typescript supports. However, the prototype syntax isn't bad on its own, so our rollup files are ok!
Typescript doesn't seem to export anything if there aren't any exports, so lib/p5.rollup.js doesn't output any types, but lib/p5.rollup.esm.js does.
This is based off of https://github.com/processing/p5.js/pull/6777, so you can see just the new Typescript bits here: https://github.com/davepagurek/p5.js/compare/initial-conversion-script..tsc
So it adds an
npm run types
command which generates, currently,types/p5.rollup.esm.d.ts
. The reason for the name is that:exports
, solib/p5.rollup.js
doesn't output any types, butlib/p5.rollup.esm.js
does.