Import
import { useNavigation } from "@typed/vue";Signatures
export declare function useNavigation<ER = never>(options?: {
readonly runtime?: MaybeRefOrGetter<VueRuntime<Navigation, ER>>;
}): {
navigate: (url: string | URL, options?: NavigationNavigateOptions) => Promise<import("effect/Exit").Success<{
readonly id: string;
readonly key: string;
readonly url: URL;
readonly state: unknown;
readonly sameDocument: boolean;
}, ER | import("@typed/navigation/model").NavigationError> | import("effect/Exit").Failure<{
readonly id: string;
readonly key: string;
readonly url: URL;
readonly state: unknown;
readonly sameDocument: boolean;
}, ER | import("@typed/navigation/model").NavigationError>>;
back: (options?: NavigationInfoOptions) => Promise<import("effect/Exit").Success<{
readonly id: string;
readonly key: string;
readonly url: URL;
readonly state: unknown;
readonly sameDocument: boolean;
}, ER | import("@typed/navigation/model").NavigationError> | import("effect/Exit").Failure<{
readonly id: string;
readonly key: string;
readonly url: URL;
readonly state: unknown;
readonly sameDocument: boolean;
}, ER | import("@typed/navigation/model").NavigationError>>;
forward: (options?: NavigationInfoOptions) => Promise<import("effect/Exit").Success<{
readonly id: string;
readonly key: string;
readonly url: URL;
readonly state: unknown;
readonly sameDocument: boolean;
}, ER | import("@typed/navigation/model").NavigationError> | import("effect/Exit").Failure<{
readonly id: string;
readonly key: string;
readonly url: URL;
readonly state: unknown;
readonly sameDocument: boolean;
}, ER | import("@typed/navigation/model").NavigationError>>;
updateCurrentEntry: (state: unknown) => Promise<import("effect/Exit").Success<Omit<{
readonly id: string;
readonly key: string;
readonly url: URL;
readonly state: unknown;
readonly sameDocument: boolean;
}, "state"> & {
readonly state: unknown;
}, ER | import("@typed/navigation/model").NavigationError> | import("effect/Exit").Failure<Omit<{
readonly id: string;
readonly key: string;
readonly url: URL;
readonly state: unknown;
readonly sameDocument: boolean;
}, "state"> & {
readonly state: unknown;
}, ER | import("@typed/navigation/model").NavigationError>>;
refresh: () => Promise<void>;
cancel: () => void;
data: Readonly<import("vue").ShallowRef<import("@typed/async-data").AsyncData<{
readonly currentEntry: {
readonly id: string;
readonly key: string;
readonly url: URL;
readonly state: unknown;
readonly sameDocument: boolean;
};
readonly entries: readonly {
readonly id: string;
readonly key: string;
readonly url: URL;
readonly state: unknown;
readonly sameDocument: boolean;
}[];
readonly transition: Option.Option<{
readonly type: "push" | "replace" | "reload" | "traverse";
readonly from: {
readonly id: string;
readonly key: string;
readonly url: URL;
readonly state: unknown;
readonly sameDocument: boolean;
};
readonly to: {
readonly url: URL;
readonly state: unknown;
readonly sameDocument: boolean;
readonly key?: string | undefined;
};
readonly info?: unknown;
}>;
readonly canGoBack: boolean;
readonly canGoForward: boolean;
}, ER>>>;
value: import("vue").ComputedRef<Option.Option<{
readonly currentEntry: {
readonly id: string;
readonly key: string;
readonly url: URL;
readonly state: unknown;
readonly sameDocument: boolean;
};
readonly entries: readonly {
readonly id: string;
readonly key: string;
readonly url: URL;
readonly state: unknown;
readonly sameDocument: boolean;
}[];
readonly transition: Option.Option<{
readonly type: "push" | "replace" | "reload" | "traverse";
readonly from: {
readonly id: string;
readonly key: string;
readonly url: URL;
readonly state: unknown;
readonly sameDocument: boolean;
};
readonly to: {
readonly url: URL;
readonly state: unknown;
readonly sameDocument: boolean;
readonly key?: string | undefined;
};
readonly info?: unknown;
}>;
readonly canGoBack: boolean;
readonly canGoForward: boolean;
}>>;
latest: import("vue").ComputedRef<Option.Option<{
readonly currentEntry: {
readonly id: string;
readonly key: string;
readonly url: URL;
readonly state: unknown;
readonly sameDocument: boolean;
};
readonly entries: readonly {
readonly id: string;
readonly key: string;
readonly url: URL;
readonly state: unknown;
readonly sameDocument: boolean;
}[];
readonly transition: Option.Option<{
readonly type: "push" | "replace" | "reload" | "traverse";
readonly from: {
readonly id: string;
readonly key: string;
readonly url: URL;
readonly state: unknown;
readonly sameDocument: boolean;
};
readonly to: {
readonly url: URL;
readonly state: unknown;
readonly sameDocument: boolean;
readonly key?: string | undefined;
};
readonly info?: unknown;
}>;
readonly canGoBack: boolean;
readonly canGoForward: boolean;
}>>;
cause: import("vue").ComputedRef<Option.Option<import("effect/Cause").Cause<ER>>>;
error: import("vue").ComputedRef<Option.Option<ER>>;
loading: import("vue").ComputedRef<boolean>;
refreshing: import("vue").ComputedRef<boolean>;
pending: import("vue").ComputedRef<boolean>;
success: import("vue").ComputedRef<boolean>;
failure: import("vue").ComputedRef<boolean>;
};Other public imports
These import paths expose the same declaration. Each page retains its own public name and signature.