codeforboston / home-energy-analysis-tool

https://www.codeforboston.org/projects/
MIT License
7 stars 25 forks source link

Fix typescript misc #209

Closed ethanstrominger closed 1 week ago

ethanstrominger commented 1 week ago

I fixed misc.tsx so that it does not error when you run tsc. I don't know why previous jobs were succeeding, but with one small change tsc works more consistently. This is the error: app/utils/misc.tsx:275:23 - error TS7023: 'downloadFile' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.

275 export async function downloadFile(url: string, retries: number = 0) {

thadk commented 1 week ago

Hi Ethan, thanks for this. I note that this file is maintained upstream in Epic Stack at: https://github.com/epicweb-dev/epic-stack/blob/main/app/utils/misc.tsx#L276 and was recently heavily refactored since we last migrated Epic Stack, although this part was not modified.

We are due to migrate our Epic Stack to use the more conventional Vite instead of previous Remix Compiler (added about 5 months ago). I'm just a bit concerned I'll forget to retain this change when I hand merge the new release but otherwise this looks good to me.