-
Notifications
You must be signed in to change notification settings - Fork 207
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
Multiple Typescript Errors #843
Comments
It looks like you are compiling the |
So the thing is we've already excluded the node modules folder in tsconfig, here's the config: {
"compilerOptions": {
"esModuleInterop": true,
"jsx": "react",
"module": "esnext",
"moduleResolution": "node",
"lib": ["es5", "es6", "DOM.Iterable", "dom", "esnext"],
"strict": true,
"sourceMap": true,
"target": "esnext"
},
"include": ["./src/js", "index.tsx"],
"exclude": ["node_modules"]
} The error also only occurs on import - it could be because typescript recursively checks all import dependencies I suppose (we're using a module called "better-react-mathjax" on top of mathjax-src, not importing it directly) |
#22 - This issue is possibly related, we have strict enabled in our repo |
I found from here that it can be resolved by adding "skipLibCheck" which prevents checking of d.ts files, but this is not really ideal, as this applies to all d.ts files. I would suggest the typescript errors could just be resolved - there's only 4 of them https://stackoverflow.com/questions/45267500/exclude-node-modules-from-problems |
You are right that these are being generated due to the The next release does include the inclusion of more complete generics in the |
I have similar problem with
And my
I've also tried to use As the issue #22 that @mark-todd mentioned, I got compile success by removing |
@skyhos, you are right, compiling MathJax with I'm not sure, however, why you are needing to compile MathJax with a different Can you say more about why you need to do this? If you are going to want to compile MathJax v4, then you will need additional values in your |
@skyhos, I see that the error is coming from compiling the .d.ts file, not the MathJax source .ts files themselves. In that case, you might need to use the |
@dpvc Hi, Davide, I was busy, excuse me for delayed reply.
Since the documentation of MathJax is too hard to read, I referred to an example by searching in Google: mathjax/MathJax#2385 (comment) If I am going wrong, can you please improve the above code by using the
I will try the option, thank you. |
Hi there,
My project uses typescript, so checks all files for errors - when it reaches this package it returns a few errors. Here is my stack trace for
npx tsc --noEmit
:Cheers,
Mark
The text was updated successfully, but these errors were encountered: