data is conditional on whether the route has a loader:
No loader → D = never → data: undefined (nothing to read).
With loader → D is the loader's return type → data: D (the
loaded value).
Meta functions declared on loader-having routes see data as
the concrete type without the | undefined mixed in — the fact
that a bare route's data is undefined at runtime doesn't leak
into every consumer.
Arguments passed to meta field functions.
datais conditional on whether the route has a loader:D = never→data: undefined(nothing to read).Dis the loader's return type →data: D(the loaded value).Meta functions declared on loader-having routes see
dataas the concrete type without the| undefinedmixed in — the fact that a bare route's data isundefinedat runtime doesn't leak into every consumer.