octet-stream / form-data

Spec-compliant FormData implementation for Node.js
https://www.npmjs.com/package/formdata-node
MIT License
142 stars 17 forks source link

Export FormDataFieldOptions #16

Closed Val-istar-Guo closed 4 years ago

Val-istar-Guo commented 4 years ago

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

octet-stream commented 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.

octet-stream commented 4 years ago

Just published a new version with typings improvements: https://github.com/octet-stream/form-data/releases/tag/v2.1.2

Hope this will help.