@variousjs/various 5.1.3 → 5.1.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@variousjs/various",
3
- "version": "5.1.3",
3
+ "version": "5.1.5",
4
4
  "description": "RequireJS(AMD) + React",
5
5
  "files": [
6
6
  "dist",
package/standalone.d.ts CHANGED
@@ -6,6 +6,13 @@ declare module '@variousjs/various/standalone' {
6
6
  ModuleDefined,
7
7
  FallbackNode,
8
8
  ErrorFallbackNode,
9
+ Dispatch,
10
+ } from '@variousjs/various'
11
+
12
+ export {
13
+ createDispatch,
14
+ createLogger,
15
+ createPostMessage,
9
16
  } from '@variousjs/various'
10
17
 
11
18
  export type DependencyType = string | object | Function
@@ -25,19 +32,18 @@ declare module '@variousjs/various/standalone' {
25
32
  * for React Component only
26
33
  */
27
34
  $ref?: RefObject<unknown>,
28
- }> & {
29
- dispatch: (next: Record<string, any>) => void,
30
- }
35
+ }>
31
36
 
32
- export function createConfig(
37
+ export function createAppConfig<S extends object = ObjectRecord>(
33
38
  config: {
34
- baseDependencies: Partial<Record<
39
+ dependencies: Partial<Record<
35
40
  string,
36
41
  DependencyType
37
42
  >>,
38
- store?: Record<string, any>,
39
- fallback?: FallbackNode<any>,
40
- errorFallback?: ErrorFallbackNode<any>,
43
+ store?: S,
44
+ actions?: Record<string, Dispatch<S>>,
45
+ fallback?: FallbackNode<S>,
46
+ errorFallback?: ErrorFallbackNode<S>,
41
47
  },
42
48
  ): void
43
49
  }