We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I think we need to replace the declare keyword to export to declare enum Format in index.d.ts I try convert svg to jpeg:
declare
export
declare enum Format
import { default as svg2img, Format, ResvgRenderOptions, svg2imgOptions } from "svg2img"; svg2img(pathToSvgFile, { format: Format.jpg, 'quality': 75 }, saveCallback);
But I can't do it, because I get error from tsc on import { Format } from "svg2img";:
tsc
import { Format } from "svg2img";
Module '"svg2img"' has no exported member 'Format'.
Also, I can't use string for format option:
svg2img(pathToSvgFile, { format: 'jpg', 'quality': 75 }, saveCallback);
Because I get this error:
Type '"jpg"' is not assignable to type 'Format | undefined'. Did you mean 'Format.jpeg'?
The text was updated successfully, but these errors were encountered:
It looks like the issue was resolved some 9 months ago by converting it to a type, but that change never made it to npm.
Sorry, something went wrong.
No branches or pull requests
I think we need to replace the
declare
keyword toexport
todeclare enum Format
in index.d.tsI try convert svg to jpeg:
But I can't do it, because I get error from
tsc
onimport { Format } from "svg2img";
:Also, I can't use string for format option:
Because I get this error:
The text was updated successfully, but these errors were encountered: