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

TypeScript: createUploadLink.mjs 'paths' is declared but its value is never read.ts(6133) #317

Closed
MortenEmde opened this issue Oct 24, 2023 · 3 comments

Comments

@MortenEmde
Copy link

When adding the "maxNodeModuleJsDepth": 10 for TypeScript compatibility of v18.0.0, a TS error in createUploadLink.mjs is possibly triggered.

'paths' is declared but its value is never read.ts(6133)

This happens on line 166

files.forEach((paths, file) => {
        customFormDataAppendFile(form, String(++i), file);
      });

suggested fix:

files.forEach((_paths, file) => {
        customFormDataAppendFile(form, String(++i), file);
      });
@jaydenseric
Copy link
Owner

That's a good suggestion, but it's surprising that is causing errors for you. What is the particular setting that causes something like that to be a TS error? I thought my config here was quite strict; stricture than people's projects are likely to be:

"strict": true

In the mean time, are you able to work around the issue by setting skipLibCheck to true?

@jaydenseric
Copy link
Owner

It's:

{
  "compilerOptions": {
    "noUnusedParameters": true
  }
}

@jaydenseric
Copy link
Owner

Thanks for raising this issue @MortenEmde; the fix has been published in v18.0.1 🚀

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

2 participants