diff --git a/.changeset/chatty-plants-divide.md b/.changeset/chatty-plants-divide.md new file mode 100644 index 00000000..db0eea0f --- /dev/null +++ b/.changeset/chatty-plants-divide.md @@ -0,0 +1,5 @@ +--- +"@solidjs/router": patch +--- + +allow URLSearchParams type for when enctype is not set to multipart/form-data diff --git a/src/data/action.ts b/src/data/action.ts index c59f6824..dd13b03d 100644 --- a/src/data/action.ts +++ b/src/data/action.ts @@ -11,7 +11,7 @@ import type { import { mockBase } from "../utils.js"; import { cacheKeyOp, hashKey, revalidate, query } from "./query.js"; -export type Action, U, V = T> = (T extends [FormData] | [] +export type Action, U, V = T> = (T extends [FormData | URLSearchParams] | [] ? JSX.SerializableAttributeValue : unknown) & ((...vars: T) => Promise>) & {