Open mac2000 opened 4 years ago
Or, as alternative, if namespace is something desired we can try to leave it as is and just "reexport" interfaces, e.g.
before:
declare module "svg-pan-zoom" {
export = svgPanZoom;
}
after:
export interface Options extends SvgPanZoom.Options {}
export interface CustomEventHandler extends SvgPanZoom.CustomEventHandler {}
export interface CustomEventOptions extends SvgPanZoom.CustomEventOptions {}
export interface Point extends SvgPanZoom.Point {}
export interface PointModifier extends SvgPanZoom.PointModifier {}
export interface Sizes extends SvgPanZoom.Sizes {}
export interface Instance extends SvgPanZoom.Instance {}
export default svgPanZoom;
which should also work, not sure which way you do prefer if any
Thanks for the pull request! My job has shifted away from front end, so I unfortunately can't keep up with maintenance. Would you be interested in becoming a maintainer?
Note that
import svgPanZoom from 'svg-pan-zoom'
will still work as usual so we are hopefully not breaking anything, but now you canimport svgPanZoom, { Options, Instance } from "dist/svg-pan-zoom";
and use interfaces in you code instead ofSvgPanZoom.Instance
namespaced way which might cause problems in some scenarious