@variousjs/various 0.2.0 → 0.4.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.
- package/dist/core.js +1 -1
- package/dist/core.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/types/index.d.ts +5 -11
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ declare module '@variousjs/various' {
|
|
|
13
13
|
}) => () => void
|
|
14
14
|
type $preload = (names: string[]) => Promise<void>
|
|
15
15
|
|
|
16
|
-
export { default as
|
|
16
|
+
export { default as Store, Connect, Dispatch } from 'nycticorax'
|
|
17
17
|
|
|
18
18
|
export class Router extends Component {}
|
|
19
19
|
export {
|
|
@@ -23,6 +23,8 @@ declare module '@variousjs/various' {
|
|
|
23
23
|
Redirect,
|
|
24
24
|
Prompt,
|
|
25
25
|
NavLink,
|
|
26
|
+
matchPath,
|
|
27
|
+
Switch,
|
|
26
28
|
} from 'react-router-dom'
|
|
27
29
|
|
|
28
30
|
export interface ComponentProps<S = {}, C = {}> {
|
|
@@ -55,20 +57,12 @@ declare module '@variousjs/various' {
|
|
|
55
57
|
$router: RouteComponentProps<{ [key: string]: string }>,
|
|
56
58
|
}
|
|
57
59
|
|
|
58
|
-
type
|
|
60
|
+
type Store<S> = {
|
|
59
61
|
getStore: () => S,
|
|
60
62
|
dispatch: (next: Partial<S>) => void,
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
export type Actions<S = {}> = {
|
|
64
|
-
[name: string]: (
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export interface Config {
|
|
68
|
-
dependencies?: { [key: string]: string },
|
|
69
|
-
components: { [key: string]: string },
|
|
70
|
-
entry?: string,
|
|
71
|
-
routerMode?: 'browser' | 'hash',
|
|
72
|
-
root?: string,
|
|
66
|
+
[name: string]: (store: Store<S>, ...args: any[]) => unknown,
|
|
73
67
|
}
|
|
74
68
|
}
|