Skip to content

Commit

Permalink
fix remix-run#9826: fix types for conditional use of unstable_data
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelgmcd committed Aug 5, 2024
1 parent 907bcdb commit 8a61ca1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/remix-server-runtime/single-fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,8 @@ type DataFunctionReturnValue =
// json/defer will be removed so everything will use the new simplified typings.
// prettier-ignore
export type Serialize<T extends Loader | Action> =
Awaited<ReturnType<T>> extends TypedDeferredData<infer D> ? D :
Awaited<ReturnType<T>> extends TypedDeferredData<infer D> | DataWithResponseInit<infer D> | Serializable ? D :
Awaited<ReturnType<T>> extends TypedResponse<Record<string, unknown>> ? SerializeFrom<T> :
Awaited<ReturnType<T>> extends DataWithResponseInit<infer D> ? D :
Awaited<ReturnType<T>>;

export type Loader = (
Expand Down

0 comments on commit 8a61ca1

Please sign in to comment.