@real-router/core 0.32.0 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ import type { PluginsDependencies } from "../namespaces/PluginsNamespace";
13
13
  import type { RouteLifecycleDependencies } from "../namespaces/RouteLifecycleNamespace";
14
14
  import type { RouterLifecycleDependencies } from "../namespaces/RouterLifecycleNamespace";
15
15
  import type { RoutesDependencies } from "../namespaces/RoutesNamespace";
16
- import type { DefaultDependencies } from "@real-router/types";
16
+ import type { DefaultDependencies, Params } from "@real-router/types";
17
17
 
18
18
  export class RouterWiringBuilder<
19
19
  Dependencies extends DefaultDependencies = DefaultDependencies,
@@ -81,7 +81,7 @@ export class RouterWiringBuilder<
81
81
  this.state.areStatesEqual(state1, state2, ignoreQueryParams),
82
82
  getDependency: (name) =>
83
83
  this.dependenciesStore.dependencies[name] as Dependencies[typeof name],
84
- forwardState: (name, params) => {
84
+ forwardState: <P extends Params = Params>(name: string, params: P) => {
85
85
  const ctx = getInternals(this.router);
86
86
 
87
87
  if (!ctx.noValidate) {
@@ -118,7 +118,10 @@ export class RouterWiringBuilder<
118
118
  setState: (state) => {
119
119
  this.state.set(state);
120
120
  },
121
- buildStateWithSegments: (routeName, routeParams) => {
121
+ buildStateWithSegments: <P extends Params = Params>(
122
+ routeName: string,
123
+ routeParams: P,
124
+ ) => {
122
125
  const ctx = getInternals(this.router);
123
126
 
124
127
  if (!ctx.noValidate) {