p5.js
p5.js copied to clipboard
p5.Vector.d.ts: Can **class Vector** be changed to **interface Vector** declaration?
Topic
In order to expand the static properties on the class Vector, it seems necessary to change the class declaration to interface declaration in p5.Vector.d.ts file.
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you!
It’s definitely a class and should stay a class.
If you explain what you are trying to achieve then I might be able to help you. static properties would go on the VectorConstructor type, whereas the Vector type describes the type of each instance of the class.
Types for p5.js is maintained externally at: https://github.com/p5-types/p5.ts. This issue should probably be filed there. I'll close this for now.