You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd actually like to add my tool itself to the p5.js repository and have those definitions continue to be auto-generated if possible, as it keeps things DRY while also serving as a way to test our own documentation.
There will definitely be some functions, like save(), whose method signatures will be too complex to describe accurately using yuidoc and which therefore will need to have custom definitions in the typescript definitions file, but I think we can work out a way to "merge" such custom definitions with the auto-generated ones.
Right now, I'm using the generated definition files. It works well for autocomplete in my IDE. Once there is any mismatch the IDE shows, I turn to the definition files and make modifications manually.
Like yesterday, I added constructor(sketch: (p:any)=>void, node?: HTMLElement|boolean, sync?: boolean); to the p5 class so that new p5(sketch) would not cause an error any more.
I hope there will be a place for typescript definition files of p5js, so others can contribute to these definition files.
I've made a Definition Request here.
@toolness has made a tool to generate definition files automatically. I think we can start from these generated definition files.
The text was updated successfully, but these errors were encountered: