-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Closed as not planned
Labels
Description
I'm using React Router as a...
library
Reproduction
import { matchRoutes } from "react-router";
import { createBrowserHistory } from "history";
export const history = createBrowserHistory();
const routes = [];
/**
* Bogus function
* not used anywhere
* needed to generate a type that we cannot import
*/
function makeInitialMatchesDummy(routes: any[]) {
return matchRoutes(routes, history.location.pathname);
}
const initialMatches: NonNullable<ReturnType<typeof makeInitialMatchesDummy>> = [];
// exporting this type results in an error (does not happen with v6)
export type IniMatches = typeof initialMatches;System Info
Windows 11, Vite, Yarn 4.5.3Used Package Manager
yarn
Expected Behavior
I expect to be able to re-export any type that I can infer
