Fixing the missing type issue with the library #412
Closed
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.
PR: Fix missing FormData and Headers type definitions
Problem
Customers using this library were encountering TypeScript compilation errors when importing @azure/functions:
types/http.d.ts:23:7 - error TS2304: Cannot find name 'FormData'.
types/http.d.ts:34:31 - error TS2304: Cannot find name 'Headers'.
types/http.d.ts:120:23 - error TS2304: Cannot find name 'Headers'.
types/http.d.ts:162:38 - error TS2304: Cannot find name 'FormData'.
types/http.d.ts:279:23 - error TS2304: Cannot find name 'Headers'.
types/http.d.ts:316:38 - error TS2304: Cannot find name 'FormData'.
The FormData and Headers types are Web API types used in the HTTP type definitions but were not properly imported. These types are part of Node.js's native fetch API (available since Node.js 18) but TypeScript requires explicit type definitions.
Solution
Why undici-types?