I'm getting a Typescript (v3.9.7) error for this line (in the template):
|
const data = new FormData(); |
This expression is not constructable.
Type 'typeof FormData' has no construct signatures.ts(2351)
api.ts(9, 1): Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.
When I change the FormData import, it works fine:
-import * as FormData from "form-data"
+import FormData from "form-data"
I'm getting a Typescript (v3.9.7) error for this line (in the template):
spec2ts/packages/openapi-client/lib/templates/_client.tpl.ts
Line 223 in d810da3
When I change the
FormDataimport, it works fine: