From ea6480e089ccfce8b5c8ce093c1ec0e70b64d535 Mon Sep 17 00:00:00 2001 From: "Alessandro (Ale) Segala" <43508+ItalyPaleAle@users.noreply.github.com> Date: Fri, 8 Dec 2023 19:53:23 -0800 Subject: [PATCH] Remove deprecated method "wrap" (#311) --- Router.d.ts | 16 ---------------- Router.svelte | 21 --------------------- 2 files changed, 37 deletions(-) diff --git a/Router.d.ts b/Router.d.ts index 686d5e3..e64617b 100644 --- a/Router.d.ts +++ b/Router.d.ts @@ -68,22 +68,6 @@ export interface WrappedComponent { //_sveltesparouter?: boolean } -/** - * Wraps a component to add route pre-conditions. - * - * @deprecated Use `wrap` from `svelte-spa-router/wrap` instead. This function will be removed in a later version. - * - * @param component Svelte component for the route - * @param userData Optional object that will be passed to each `conditionsFailed` event - * @param conditions Route pre-conditions to add, which will be executed in order - * @returns Wrapped component - */ -export function wrap( - component: typeof SvelteComponent, - userData?: object, - ...conditions: RoutePrecondition[] -): WrappedComponent - /** * Navigates to a new page programmatically. * diff --git a/Router.svelte b/Router.svelte index 5ef7089..6920389 100644 --- a/Router.svelte +++ b/Router.svelte @@ -1,27 +1,6 @@