Closed LennyLip closed 2 years ago
Hi there!
Thanks for the submission! You link to the basic example with Latex and then the code seems related to MathML so I'm a bit in the dark here :) Could you elaborate on what you mean by "running it with TypeScript" (I understand what running something with TypeScript means but given the example you linked to, it's kind of unclear what you're trying to do).
From your code excerpt, it looks like you're not conforming to the MathJax 3 types as set forth by the npm package mathjax-full
(from where the MathJax 3 types are, without any processing at all, imported). Since this is not part of the code in better-react-mathjax
, a possible bug would have to be filed with the mathjax-full
repo instead (as you also point out).
I can try to help you out but then you need to provide a sandbox where this error shows. TypeScript type errors can indeed be hard to troubleshoot sometimes, especially when they involve type parameters.
I would need to see more of your code to get a better picture of what you're doing here... Seems all these classes are your own so why does MathJax throw an error...? Are you maybe declaring a conflicting name? What happens if you change the name of your class MmlFactory
. You could also look at the mathjax-full
source to get a better understanding of the problem.
Thanks. Codesanbox has no issue with its default typescript configs. I will create the project later.
Since there has been no news in this issue for a long time, I'm closing it. Feel free to open if you can provide more info.
Hey, thanks for the app.
Trying to run https://codesandbox.io/s/better-react-mathjax-basic-example-latex-bj8gd?file=/src/App.js with typescript code, but got the following:
skipLibCheck helped, but it seems it is not a good setting. Is this mathjax src issue?