Skip to content

Commit

Permalink
Add undefined to useActionData type override (#9322)
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Apr 29, 2024
1 parent a171049 commit 75321d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/happy-ladybugs-smoke.md
@@ -0,0 +1,5 @@
---
"@remix-run/react": patch
---

Add `undefined` to `useActionData` type override
4 changes: 2 additions & 2 deletions packages/remix-react/future/single-fetch.d.ts
@@ -1,4 +1,4 @@
import type { MetaArgs, UNSAFE_MetaMatch } from "@remix-run/react";
import type { MetaArgs, UIMatch, UNSAFE_MetaMatch } from "@remix-run/react";
import type {
LoaderFunctionArgs,
ActionFunctionArgs,
Expand Down Expand Up @@ -57,7 +57,7 @@ declare module "@remix-run/react" {
: never;

export function useActionData<T>(): T extends ActionFunction_SingleFetch
? SingleFetchSerialize_V2<T>
? SingleFetchSerialize_V2<T> | undefined
: never;

export function useRouteLoaderData<T>(
Expand Down

0 comments on commit 75321d3

Please sign in to comment.