@koordinates/xstate-tree 4.1.0-beta.1 → 4.1.0-beta.2
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.
package/lib/xstate-tree.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export declare type AnyRoute = {
|
|
|
41
41
|
getEvent: any;
|
|
42
42
|
event: string;
|
|
43
43
|
basePath: string;
|
|
44
|
-
history: XstateTreeHistory;
|
|
44
|
+
history: () => XstateTreeHistory;
|
|
45
45
|
parent?: AnyRoute;
|
|
46
46
|
paramsSchema?: Z.ZodObject<any>;
|
|
47
47
|
querySchema?: Z.ZodObject<any>;
|
|
@@ -100,7 +100,7 @@ export declare function buildActions<TMachine extends AnyStateMachine, TActions,
|
|
|
100
100
|
* @param history - the history object to use for this route factory, this needs to be the same one used in the trees root component
|
|
101
101
|
* @param basePath - the base path for this route factory
|
|
102
102
|
*/
|
|
103
|
-
export declare function buildCreateRoute(history: XstateTreeHistory, basePath: string): {
|
|
103
|
+
export declare function buildCreateRoute(history: () => XstateTreeHistory, basePath: string): {
|
|
104
104
|
simpleRoute<TBaseRoute extends AnyRoute>(baseRoute?: TBaseRoute | undefined): <TEvent extends string, TParamsSchema extends Z.ZodObject<any, "strip", Z.ZodTypeAny, {
|
|
105
105
|
[x: string]: any;
|
|
106
106
|
}, {
|
|
@@ -529,7 +529,7 @@ export declare type Route<TParams, TQuery, TEvent, TMeta> = {
|
|
|
529
529
|
* Event type for this route
|
|
530
530
|
*/
|
|
531
531
|
event: TEvent;
|
|
532
|
-
history: XstateTreeHistory;
|
|
532
|
+
history: () => XstateTreeHistory;
|
|
533
533
|
basePath: string;
|
|
534
534
|
parent?: AnyRoute;
|
|
535
535
|
paramsSchema?: Z.ZodObject<any>;
|
package/package.json
CHANGED