I am currently in the process of updating the Paper.js Typings located on GitHub at this repository:
github.com/clark-stevenson/paper.d.ts
Within Paper.js, there exists a MouseEvent class, which is not an extension of JavaScript's MouseEvent, but rather a wrapper with the same name. This presents a challenge when trying to reference JavaScript's built-in MouseEvent while also dealing with a class of the same name.
Since I do not directly instantiate a Paper.js Mouse Event myself, my current temporary solution involves renaming it to PaperMouseEvent:
export class PaperMouseEvent extends Event {
constructor(type:string, event:MouseEvent, point:Point, target:Item, delta:Point)
/**
* JavaScript's mouse event
*/
event:MouseEvent;
}
Is there a proper way to address this issue, or is this workaround commonly used?