We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3a5f38 commit 194788bCopy full SHA for 194788b
2 files changed
.changeset/violet-trains-change.md
@@ -0,0 +1,5 @@
1
+---
2
+"@remix-run/react": patch
3
4
+
5
+[REMOVE] Fix return type when no promise is used
packages/remix-react/future/single-fetch.d.ts
@@ -36,10 +36,10 @@ type DataFunctionReturnValue =
36
37
type LoaderFunction_SingleFetch = (
38
args: LoaderFunctionArgs
39
-) => Promise<DataFunctionReturnValue>;
+) => Promise<DataFunctionReturnValue> | DataFunctionReturnValue;
40
type ActionFunction_SingleFetch = (
41
args: ActionFunctionArgs
42
43
44
// Backwards-compatible type for Remix v2 where json/defer still use the old types,
45
// and only non-json/defer returns use the new types. This allows for incremental
0 commit comments