Browser Used: Chrome 55.0.2883.87, FireFox 50.1.0 So I want to use TypeScript to check if my FormData has all required fields. Programming Language: C++ (Cpp) Class/Type: FormData. The for-of Loop with the entries Method. Please guide me. Let's commit our code, and in . I'm not sure if it is even possible. Edit: Running basic tests, Map.entries() is fine with target es2015. This makes a little more sense - it doesn't yet in all environments. I'm trying to get in the habit of writing a post about anything that takes me more than, say, 15 minutes of trial and error and Google to get right. However, the object used to be entirely opaque. */. First thing I don't think it's possible to build a FormData object from a form as you've specified, and to get values from the form use the method described in the accepted answer -- this is more of an addendum! get some data out of a FormData object: this will only return the So we will redeclare static types for this method via the usage of the strongest Typescript tools which . This is the non-null assertion operator - querySelector returns a value of type Element | null. data, but can be used independently from forms in order to transmit It simply doesn't iterate at all, it looks for what it needs. . You can also pass it directly to the URLSearchParams constructor if you want to generate query parameters in the way a