Closed Val-istar-Guo closed 4 years ago
I was trying to do so, but that type checking tool was failing tests, so I decided to not include these changes for type declarations until I figure out how to fix my issues. Besides, I'm not really familiar with TypeScript. So I can't do much about that as I don't really need it yet.
Just published a new version with typings improvements: https://github.com/octet-stream/form-data/releases/tag/v2.1.2
Hope this will help.
Why not export
FormDataFieldOptions
,File
,Blob
interface?https://github.com/octet-stream/form-data/blob/01a8b279c1eb16190a5d33e3e9d86020f0f48b09/type/FormData.d.ts#L8-L13
https://github.com/octet-stream/form-data/blob/01a8b279c1eb16190a5d33e3e9d86020f0f48b09/src/lib/util/File.mjs#L13
.get() return type maybe a
File
https://github.com/octet-stream/form-data/blob/01a8b279c1eb16190a5d33e3e9d86020f0f48b09/type/FormData.d.ts#L102