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

how to run autotable in typescript mts? #983

Open
sqllyw opened this issue Jul 27, 2023 · 1 comment
Open

how to run autotable in typescript mts? #983

sqllyw opened this issue Jul 27, 2023 · 1 comment

Comments

@sqllyw
Copy link

sqllyw commented Jul 27, 2023

hi,
trying out this example:

https://github.com/simonbengtsson/jsPDF-AutoTable/blob/master/examples/typescript/index.ts

tsx index.ts

it works. but when you change the extension to .mts,

tsx index.mts, got this error:

autoTable(doc, {
^

TypeError: autoTable is not a function

using the plug in method, doc.autoTable, works in mts, but can't refer to the types of autoTable' userOptions, any idea how to make it work? thanks

@simonbengtsson
Copy link
Owner

Sounds like a bug to me. I would have expected that to work.

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

No branches or pull requests

3 participants