sigment 1.0.8 → 1.0.10
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/dist/types/index.d.ts +15 -11
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -64,26 +64,30 @@ export function memoizeFunc<
|
|
|
64
64
|
options?: MemoizeOptions
|
|
65
65
|
): F & { clear(): void };
|
|
66
66
|
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
export type Route = {
|
|
71
|
+
loader: () => Promise<any>;
|
|
72
|
+
urlParam?: string;
|
|
73
|
+
guard?: (params?: Record<string, any>) => boolean | Promise<boolean>;
|
|
74
|
+
logic?: () => void;
|
|
75
|
+
cacheExpiration?: number;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export type RoutesMap = Record<string, Route | string>;
|
|
79
|
+
|
|
67
80
|
/**
|
|
68
81
|
* Parses a path given a user-defined routes object.
|
|
69
82
|
*/
|
|
70
83
|
export declare function parsePath(
|
|
71
|
-
componentImports:
|
|
72
|
-
string,
|
|
73
|
-
| {
|
|
74
|
-
loader: () => Promise<any>;
|
|
75
|
-
urlParam?: string;
|
|
76
|
-
guard?: (params: Record<string, any>) => boolean | Promise<boolean>;
|
|
77
|
-
logic?: () => void;
|
|
78
|
-
cacheExpiration?: number;
|
|
79
|
-
}
|
|
80
|
-
| string // fallback route as string route name
|
|
81
|
-
>
|
|
84
|
+
componentImports: RoutesMap
|
|
82
85
|
): {
|
|
83
86
|
componentName: string;
|
|
84
87
|
params: any | object;
|
|
85
88
|
};
|
|
86
89
|
|
|
90
|
+
|
|
87
91
|
/**
|
|
88
92
|
* Loads a component and optionally runs logic, returning an HTMLElement.
|
|
89
93
|
*/
|
package/package.json
CHANGED