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(v2_meta): hint data as being potentially undefined #6231

Merged
merged 3 commits into from
May 5, 2023
Merged
Changes from 1 commit
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
Next Next commit
fix(v2_meta): hint data as being potentially undefined
Closes #6210
machour committed Apr 28, 2023
commit bc2e27b9d5b76e3ee31166bfecde7d4f051fb6e0
4 changes: 3 additions & 1 deletion packages/remix-react/routeModules.ts
Original file line number Diff line number Diff line change
@@ -117,7 +117,9 @@ export interface V2_MetaArgs<
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> : AppData)
| undefined;
params: Params;
location: Location;
matches: V2_MetaMatches<MatchLoaders>;
4 changes: 3 additions & 1 deletion packages/remix-server-runtime/routeModules.ts
Original file line number Diff line number Diff line change
@@ -200,7 +200,9 @@ 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> : AppData)
| undefined;
params: Params;
location: Location;
matches: V2_ServerRuntimeMetaMatches<MatchLoaders>;