Fix: Cannot find name FormData type error & remove HTMLFormElement type error#354
Open
Procaseycash wants to merge 5 commits intomailgun:masterfrom
Open
Fix: Cannot find name FormData type error & remove HTMLFormElement type error#354Procaseycash wants to merge 5 commits intomailgun:masterfrom
Procaseycash wants to merge 5 commits intomailgun:masterfrom
Conversation
Issue:
```
node_modules/mailgun.js/interfaces/IFormData.d.ts:6:20 - error TS2304: Cannot find name 'HTMLFormElement'.
6 new (options?: HTMLFormElement | IFormDataOptions): NodeFormData | FormData;
~~~~~~~~~~~~~~~
node_modules/mailgun.js/interfaces/IFormData.d.ts:6:72 - error TS2304: Cannot find name 'FormData'.
6 new (options?: HTMLFormElement | IFormDataOptions): NodeFormData | FormData;
~~~~~~~~
node_modules/mailgun.js/request.d.ts:20:127 - error TS2304: Cannot find name 'FormData'.
20 command(method: string, url: string, data?: Record<string, unknown> | Record<string, unknown>[] | string | NodeFormData | FormData, options?: Record<string, unknown>, addDefaultHeaders?: boolean): Promise<APIResponse>;
~~~~~~~~
Found 3 errors in 2 files.
Errors Files
2 node_modules/mailgun.js/interfaces/IFormData.d.ts:6
1 node_modules/mailgun.js/request.d.ts:20
```
FormData as HTMLFormElement causes an error when formData is passed down.
Remove formData as it is not declared causing failure for build in tsc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue:
FormDatatype error exception in tsc buildIssue:
Solution:
FormDatawhich was already calledNodeFormDataafter import.