svgdotjs / svg.js

The lightweight library for manipulating and animating SVG
https://svgjs.dev
Other
11.04k stars 1.08k forks source link

Added exports from window.js #1126

Closed pjbatista closed 4 years ago

pjbatista commented 4 years ago

Added getWindow, restoreWindow, saveWindow, and withWindow to the exports of "main.js" and to the type declarations in "svg.js.d.ts".

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 99.924% when pulling b7e1bdd1f9b9395b62079c3f4eafdf4b0e7cf997 on pjbatista:1124-window-exports into bc938f05b708041921cf9d75b2cd84c92574c463 on svgdotjs:master.

Fuzzyma commented 4 years ago

thanks!

bzuker commented 3 years ago

Hi! Is there any chance to do a patch release for these changes? I need to use registerWindow but it's currently not exported in version 3.0.16. Thanks!

Fuzzyma commented 3 years ago

@bzuker registerWindow IS exported. Only the other window functions are not

bzuker commented 3 years ago

@bzuker registerWindow IS exported. Only the other window functions are not

Maybe I'm looking in the wrong place, but I'm checking here: https://github.com/svgdotjs/svg.js/blob/3.0.16/svg.js.d.ts And I don't see it exported there.

I notice the function is exported here https://github.com/svgdotjs/svg.js/blob/3.0.16/src/main.js (which is probably what you mean)

However, I could work around it doing:

declare module "@svgdotjs/svg.js" {
  const registerWindow: Function;
}

Thank for your quick response!