Open braaar opened 1 year ago
That sounds reasonable. I'll have a look this week.
Could it be this is actually a problem with @types/node
and I'm just doing an XY problem here? Someone else should probably reproduce this behaviour to be sure. I'm not sure where the FormData
type is coming from when I'm not actively importing it from anywhere.
I had a interesting finding on this: In another project of mine, I'm using undici
directly.
In that project, I had to use @types/node
types (the global FormData type).
I get a Type error when attempting to use FormData in a body (even though my project uses Node 18):
I can fix this by importing FormData from undici, but then I have to install undici in my project:
import { FormData } from 'undici';
It would be nice to not have to install
undici
in my project. This could be achieved by exporting FormData intypical-fetch
.