Is there a way to validate that the route path provided to useRouteLoaderData maps to a valid path, either as part of remix directly or as a plugin/extension for remix?
i.e. so that if you used useRouteLoaderData("routes/_auth+/_layout") , typescript would be able to identify the path as invalid if there wasn't a routes/_auth+/_layout.tsx file to map to.
I am wary about just using bare strings for useRouteLoaderData, as a file rename/move could silently break part of the site and potentially have the breakage only being found at runtime. I'd far prefer issues like this to be found by the typescript language checker at compile time so they can be found easily and fixed immediately as part of the file move/rename.