TypeScript: createUploadLink.mjs 'paths' is declared but its value is never read.ts(6133)
MortenEmde opened this issue · 3 comments
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);
});
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:
apollo-upload-client/jsconfig.json
Line 6 in f44feaf
In the mean time, are you able to work around the issue by setting skipLibCheck
to true
?
It's:
{
"compilerOptions": {
"noUnusedParameters": true
}
}
Thanks for raising this issue @MortenEmde; the fix has been published in v18.0.1 🚀