[fix] `ReadOnlyFormData` types
Fix type errors inside ReadOnlyFormData that didn't allow it to be used inside for..of loops
ADD
.changeset/real-pens-watch.md
+---
+'@sveltejs/kit': patch
+---
+
+Fix type errors inside ReadOnlyFormData that didn't allow it to be used inside for..of loops

MODIFY
packages/kit/types/helper.d.ts
packages/kit/types/helper.d.ts
-interface ReadOnlyFormData extends Iterator<[string, string]> {
+interface ReadOnlyFormData {
get: (key: string) => string;
getAll: (key: string) => string[];
has: (key: string) => boolean;
- entries: () => Iterator<[string, string]>;
- keys: () => Iterator<string>;
- values: () => Iterator<string>;
+ entries: () => Generator<[string, string], void>;
+ keys: () => Generator<string, void>;
+ values: () => Generator<string, void>;
+ [Symbol.iterator]: () => Generator<[string, string], void>;
}
type BaseBody = string | Buffer | ReadOnlyFormData;

[fix] `ReadOnlyFormData` types (#1830)

Fix type errors inside ReadOnlyFormData that didn't allow it to be used inside for..of loops