@vnejs/shared 0.2.0 → 0.2.1
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 +1 -1
- package/src/index.ts +1 -1
- package/src/types.ts +5 -14
- package/tsconfig.json +2 -7
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -34,7 +34,7 @@ export const regModule = (Module: VneModuleClass): VneModuleClass => {
|
|
|
34
34
|
return Module;
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
const cloneRegistryEntry = <T extends object>(value: T): T => ({ ...value } as T
|
|
37
|
+
const cloneRegistryEntry = <T extends object>(value: T): T => ({ ...value }) as T;
|
|
38
38
|
|
|
39
39
|
export const regPlugin = (
|
|
40
40
|
namespace: VneNamespace = "",
|
package/src/types.ts
CHANGED
|
@@ -40,14 +40,10 @@ type OptionalPluginMapValues<T> = {
|
|
|
40
40
|
[K in keyof T]?: T[K] extends object ? Partial<T[K]> & T[K] : T[K];
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
-
export type VnePluginConstantsMapRegistry = OptionalPluginMapValues<VnePluginConstantsMap> &
|
|
44
|
-
|
|
45
|
-
export type
|
|
46
|
-
|
|
47
|
-
export type VnePluginSettingsMapRegistry = OptionalPluginMapValues<VnePluginSettingsMap> &
|
|
48
|
-
Partial<Record<string, VnePluginSettingsRegistry | undefined>>;
|
|
49
|
-
export type VnePluginParamsMapRegistry = OptionalPluginMapValues<VnePluginParamsMap> &
|
|
50
|
-
Partial<Record<string, VnePluginParamsRegistry | undefined>>;
|
|
43
|
+
export type VnePluginConstantsMapRegistry = OptionalPluginMapValues<VnePluginConstantsMap> & Partial<Record<string, VnePluginConstantsRegistry | undefined>>;
|
|
44
|
+
export type VnePluginEventsMapRegistry = OptionalPluginMapValues<VnePluginEventsMap> & Partial<Record<string, VnePluginEventsRegistry | undefined>>;
|
|
45
|
+
export type VnePluginSettingsMapRegistry = OptionalPluginMapValues<VnePluginSettingsMap> & Partial<Record<string, VnePluginSettingsRegistry | undefined>>;
|
|
46
|
+
export type VnePluginParamsMapRegistry = OptionalPluginMapValues<VnePluginParamsMap> & Partial<Record<string, VnePluginParamsRegistry | undefined>>;
|
|
51
47
|
|
|
52
48
|
/** Fallback shape for one plugin namespace not listed in *Map interfaces. */
|
|
53
49
|
export interface VnePluginConstants {}
|
|
@@ -60,12 +56,7 @@ export type VnePluginEventsRegistry = VnePluginEvents & Partial<Record<string, s
|
|
|
60
56
|
export type VnePluginSettingsRegistry = VnePluginSettings & Partial<Record<string, string>>;
|
|
61
57
|
export type VnePluginParamsRegistry = VnePluginParams & Partial<Record<string, unknown>>;
|
|
62
58
|
|
|
63
|
-
export type VneNamespace =
|
|
64
|
-
| keyof VnePluginConstantsMap
|
|
65
|
-
| keyof VnePluginEventsMap
|
|
66
|
-
| keyof VnePluginSettingsMap
|
|
67
|
-
| keyof VnePluginParamsMap
|
|
68
|
-
| (string & {});
|
|
59
|
+
export type VneNamespace = keyof VnePluginConstantsMap | keyof VnePluginEventsMap | keyof VnePluginSettingsMap | keyof VnePluginParamsMap | (string & {});
|
|
69
60
|
|
|
70
61
|
export type VneRegistry = {
|
|
71
62
|
CONST: VnePluginConstantsMapRegistry;
|