Skip to content
New issue

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

SVG related functions are not represented in the .d.ts files #310

Open
waweber opened this issue Oct 25, 2023 · 4 comments
Open

SVG related functions are not represented in the .d.ts files #310

waweber opened this issue Oct 25, 2023 · 4 comments

Comments

@waweber
Copy link

waweber commented Oct 25, 2023

I'm using version 4.1.1 and the SVG related functions don't seem to be included in the declaration files for any platform.

@metafloor
Copy link
Owner

I discovered this issue about 3 days ago and the fix is already queued up on my local branch. I am expecting to cut the release - which addresses #306 - this weekend. In the interim, if you want to manually add in the definitions:

    export function toSVG(opts: RenderOptions): string;
    export function drawingSVG(): DrawingContext<string>;

They will appear immediately above the // platform-specific exports comment.

@hatsantos
Copy link

Was testing the new version and got the found de same issue.

When trying to use the toSVG function I get a TS error:

Property 'toSVG' does not exist on type 'typeof BwipJs'.ts(2339)

metafloor added a commit that referenced this issue Nov 1, 2023
@metafloor
Copy link
Owner

v4.1.2 now contains the SVG declarations. Please give it a try.

@hatsantos
Copy link

Looks good to me! 💯

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants