Skip to content

Commit 47c27fc

Browse files
committed
fix(svelte): remove unnecessary wrapping
1 parent d2e628b commit 47c27fc

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/lib/router/router.svelte.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export class Router<Name extends RouteName = RouteName> implements IRouter<Name>
6767
* @reactive
6868
* @private
6969
*/
70-
#routes: Map<string, ParsedRoute<Name>> = $state(new SvelteMap());
70+
#routes: Map<string, ParsedRoute<Name>> = new SvelteMap<string, ParsedRoute<Name>>();
7171

7272
/**
7373
* Sorted list of all the routes added to the router.
@@ -81,7 +81,7 @@ export class Router<Name extends RouteName = RouteName> implements IRouter<Name>
8181
* @reactive
8282
* @private
8383
*/
84-
#namedRoutes: Map<Name, string> = $state(new SvelteMap());
84+
#namedRoutes: Map<Name, string> = new SvelteMap<Name, string>();
8585

8686
/**
8787
* Current {@link RouterLocation}
@@ -116,28 +116,28 @@ export class Router<Name extends RouteName = RouteName> implements IRouter<Name>
116116
* @reactive
117117
* @private
118118
*/
119-
#beforeEachGuards: Set<NavigationGuard<Name>> = $state(new SvelteSet());
119+
#beforeEachGuards: Set<NavigationGuard<Name>> = new SvelteSet();
120120

121121
/**
122122
* List of navigation listeners that should be executed when the navigation is triggered but before the route is resolved.
123123
* @reactive
124124
* @private
125125
*/
126-
#onStartListeners: Set<NavigationListener<Name>> = $state(new SvelteSet());
126+
#onStartListeners: Set<NavigationListener<Name>> = new SvelteSet();
127127

128128
/**
129129
* List of navigation listeners that should be executed when the navigation is triggered and the route is resolved.
130130
* @reactive
131131
* @private
132132
*/
133-
#onEndListeners: Set<NavigationEndListener<Name>> = $state(new SvelteSet());
133+
#onEndListeners: Set<NavigationEndListener<Name>> = new SvelteSet();
134134

135135
/**
136136
* List of navigation listeners that should be executed when an error occurs during navigation.
137137
* @reactive
138138
* @private
139139
*/
140-
#onErrorListeners: Set<NavigationErrorListener<Name>> = $state(new SvelteSet());
140+
#onErrorListeners: Set<NavigationErrorListener<Name>> = new SvelteSet();
141141

142142
/**
143143
* If the router is listening to `popstate` (history API) or `currententrychange` (navigation API) events.

src/lib/router/view.svelte.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,28 +51,28 @@ export class View<Name extends RouteName = RouteName> implements IView<Name> {
5151
* @reactive
5252
* @private
5353
*/
54-
#onChangeListeners: Set<ViewChangeListener<Name>> = $state(new SvelteSet());
54+
#onChangeListeners: Set<ViewChangeListener<Name>> = new SvelteSet();
5555

5656
/**
5757
* List of listeners that should be executed when a view start loading a component.
5858
* @reactive
5959
* @private
6060
*/
61-
#onViewChangeListeners: Set<ViewChangeListener<Name>> = $state(new SvelteSet());
61+
#onViewChangeListeners: Set<ViewChangeListener<Name>> = new SvelteSet();
6262

6363
/**
6464
* List of listeners that should be executed when a view load a component.
6565
* @reactive
6666
* @private
6767
*/
68-
#onLoadedListeners: Set<ViewChangeListener<Name>> = $state(new SvelteSet());
68+
#onLoadedListeners: Set<ViewChangeListener<Name>> = new SvelteSet();
6969

7070
/**
7171
* List of listeners that should be executed when an error occurs during view loading.
7272
* @reactive
7373
* @private
7474
*/
75-
#onErrorListeners: Set<LoadingErrorListener<Name>> = $state(new SvelteSet());
75+
#onErrorListeners: Set<LoadingErrorListener<Name>> = new SvelteSet();
7676

7777
/**
7878
* Unique identifier of the view instance.

0 commit comments

Comments
 (0)