DEV Community

Discussion on: FormData in TypeScript

 
deciduously profile image
Ben Lovy

Interesting - thank you for the issue link, I'll give it a whirl when I get back to my computer. I missed that one when searching it myself.

In that conversation, though, they mention needing to use a target < es2015 - I did try doing that instead to no avail. If Array.from() solves the issue, though, it's a small price to pay, I don't think it's any less readable.

Thread Thread
 
deciduously profile image
Ben Lovy

Ah - another comment in that thread had the fix. You need to add "dom.iterable" to your libs in tsconfig - I'll update the post. Thank you thank you!

Thread Thread
 
foresthoffman profile image
Forest Hoffman

My pleasure! Glad it's fixed 😀