Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(typescript): Allow meta data and parentsData to be undefined #5787

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/remix-server-runtime/routeModules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ interface V2_ServerRuntimeMetaMatch<
> {
id: RouteId;
pathname: AgnosticRouteMatch["pathname"];
data: Loader extends LoaderFunction ? SerializeFrom<Loader> : unknown;
data: Loader extends LoaderFunction ? SerializeFrom<Loader> | undefined : unknown;
handle?: unknown;
params: AgnosticRouteMatch["params"];
meta: V2_ServerRuntimeMetaDescriptor[];
Expand All @@ -200,7 +200,7 @@ export interface V2_ServerRuntimeMetaArgs<
Loader extends LoaderFunction | unknown = unknown,
MatchLoaders extends Record<string, unknown> = Record<string, unknown>
> {
data: Loader extends LoaderFunction ? SerializeFrom<Loader> : AppData;
data: Loader extends LoaderFunction ? SerializeFrom<Loader> | undefined : AppData;
params: Params;
location: Location;
matches: V2_ServerRuntimeMetaMatches<MatchLoaders>;
Expand Down