mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Revert 'fix type error'
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
321913ee57
commit
e22a309c33
@ -3,7 +3,6 @@
|
|||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectionToken } from "@ogre-tools/injectable";
|
import { getInjectionToken } from "@ogre-tools/injectable";
|
||||||
import type { SetRequired } from "type-fest";
|
|
||||||
import type { Route } from "./front-end-route-injection-token";
|
import type { Route } from "./front-end-route-injection-token";
|
||||||
|
|
||||||
type RequiredKeys<T> = Exclude<
|
type RequiredKeys<T> = Exclude<
|
||||||
@ -38,11 +37,11 @@ export type NavigateToRouteOptions<TParameter> = Parameters<TParameter> & {
|
|||||||
withoutAffectingBackButton?: boolean;
|
withoutAffectingBackButton?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type NavigateToRoute = <TRoute extends Route<object | void>>(
|
export type NavigateToRoute = <TRoute extends Route<TParameter>, TParameter extends object | void>(
|
||||||
route: TRoute,
|
route: TRoute,
|
||||||
options?: NavigateToRouteOptions<SetRequired<TRoute, "parameterSignature">["parameterSignature"]>,
|
options?: NavigateToRouteOptions<TParameter>,
|
||||||
) => void;
|
) => void;
|
||||||
|
|
||||||
export const navigateToRouteInjectionToken = getInjectionToken<NavigateToRoute>(
|
export const navigateToRouteInjectionToken = getInjectionToken<NavigateToRoute>({
|
||||||
{ id: "navigate-to-route-injection-token" },
|
id: "navigate-to-route-injection-token",
|
||||||
);
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user