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