I know this is now published to DT, but thought this would be the best place to discuss and get in touch. I've independently also created types for OpenSeadragon, they're unsurprisingly similar! One thing I did spend more time focussing on was the event system. It's not fully tested yet (why it's still just local to that repository for now) but thought it might be of interest to you.
I know this is now published to DT, but thought this would be the best place to discuss and get in touch. I've independently also created types for OpenSeadragon, they're unsurprisingly similar! One thing I did spend more time focussing on was the event system. It's not fully tested yet (why it's still just local to that repository for now) but thought it might be of interest to you.
Types can be found here: https://github.com/stephenwf/use-open-seadragon/tree/master/src/types Utility for event handling: https://github.com/stephenwf/use-open-seadragon/blob/master/src/types/util.ts#L51-L58 Example event list for a class: https://github.com/stephenwf/use-open-seadragon/blob/master/src/types/viewer.ts Event source base class: https://github.com/stephenwf/use-open-seadragon/blob/master/src/types/event-source.ts
The base class lets you get the types on these types of handler functions, but only the ones supported by the class:
and: