Skip to content

Commit b8a43fa

Browse files
ref(rr6): Remove exports on some legacy router types (#78856)
1 parent 137448c commit b8a43fa

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

static/app/types/legacyReactRouter.tsx

+9-9
Original file line numberDiff line numberDiff line change
@@ -13,47 +13,47 @@ import type {
1313
Query,
1414
} from 'history';
1515

16-
export interface Params {
16+
interface Params {
1717
[key: string]: string;
1818
}
1919

20-
export type RoutePattern = string;
20+
type RoutePattern = string;
2121
export type RouteComponent = React.ComponentClass<any> | React.FunctionComponent<any>;
2222

23-
export interface RouteComponents {
23+
interface RouteComponents {
2424
[name: string]: RouteComponent;
2525
}
2626

27-
export interface RouterState<Q = any> {
27+
interface RouterState<Q = any> {
2828
components: RouteComponent[];
2929
location: Location<Q>;
3030
params: Params;
3131
routes: PlainRoute[];
3232
}
3333

34-
export interface RedirectFunction {
34+
interface RedirectFunction {
3535
(location: LocationDescriptor): void;
3636
(state: LocationState, pathname: Pathname | Path, query?: Query): void;
3737
}
3838

3939
type AnyFunction = (...args: any[]) => any;
4040

41-
export type EnterHook = (
41+
type EnterHook = (
4242
nextState: RouterState,
4343
replace: RedirectFunction,
4444
callback?: AnyFunction
4545
) => any;
4646

47-
export type LeaveHook = (prevState: RouterState) => any;
47+
type LeaveHook = (prevState: RouterState) => any;
4848

49-
export type ChangeHook = (
49+
type ChangeHook = (
5050
prevState: RouterState,
5151
nextState: RouterState,
5252
replace: RedirectFunction,
5353
callback?: AnyFunction
5454
) => any;
5555

56-
export type RouteHook = (nextLocation?: Location) => any;
56+
type RouteHook = (nextLocation?: Location) => any;
5757

5858
type ComponentCallback = (err: any, component: RouteComponent) => any;
5959
type ComponentsCallback = (err: any, components: RouteComponents) => any;

0 commit comments

Comments
 (0)