riftt 1.0.23 → 1.0.24

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.
Files changed (2) hide show
  1. package/dist/rift.d.ts +28 -0
  2. package/package.json +2 -1
package/dist/rift.d.ts ADDED
@@ -0,0 +1,28 @@
1
+ export interface Route {
2
+ path: string;
3
+ template: string;
4
+ dataset?: string;
5
+ props?: (params: any, query: any) => any;
6
+ }
7
+
8
+ export interface StoreOptions {
9
+ persist?: boolean;
10
+ key?: string;
11
+ storage?: Storage;
12
+ paths?: string[];
13
+ debounce?: number;
14
+ }
15
+
16
+ export interface R {
17
+ store<T extends object>(name: string, definition: T, options?: StoreOptions | boolean): T;
18
+ store<T extends object>(name: string): T;
19
+ }
20
+
21
+ export const r: R;
22
+
23
+ export function createRouter(routes: Route[]): any;
24
+ export function initRipple(): void;
25
+ export function mount(router: any): void;
26
+ export function store<T extends object>(definition: T): T;
27
+
28
+ export default function rift(routes: Route[]): void;
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "riftt",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
4
4
  "type": "module",
5
5
  "main": "dist/rift.js",
6
+ "types": "dist/rift.d.ts",
6
7
  "scripts": {
7
8
  "build": "rollup -c",
8
9
  "test": "echo \"Error: no test specified\" && exit 1"