Error TS2339: Property 'entries' does not exist on type 'FormData'

The method entries is not supported by all browsers. If you want to use the method anyways, and still have the target set to es5, you can extend the current interface

declare global {
  interface FormData {
    entries(): Iterator<[USVString, USVString | Blob]>;
  }
}

TypeScript isn't supporting it unless you are compiling to ES6.

"target": "es5"

If it is es6, then it will work.


You need to add "dom.iterable" to your lib list in tsconfig.json, for example:

{
  "compilerOptions": {
    "baseUrl": ".",
    "outDir": "build/dist",
    "module": "esnext",
    "target": "es6",
    "lib": [
      "es2019",
      "dom",
      "dom.iterable" // <- there you are
    ],
    // ...
}