jaydenseric / extract-files

A function to recursively extract files and their object paths within a value, replacing them with null in a deep clone without mutating the original value. FileList instances are treated as File instance arrays. Files are typically File and Blob instances.
https://npm.im/extract-files
MIT License
56 stars 23 forks source link

Document required TypeScript libs #34

Open devkral opened 1 year ago

devkral commented 1 year ago

Version 13.0.0

I get in the new version the error:

<sourcefolder>/node_modules/apollo-upload-client/node_modules/extract-files/extractFiles.mjs(141,30)
      TS2488: Type 'any[] | FileList' must have a '[Symbol.iterator]()' method that returns an iterator.

It seems like a bug in your library in combination with typescript.

I use the library via apollo-upload-client

devkral commented 1 year ago

The problem was the missing inclusion of "DOM.Iterable" in the lib part of tsconfig.json. Please document this in requirements