@vnejs/shared 0.0.16 → 0.0.17
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/index.d.ts +1 -1
- package/dist/types.d.ts +4 -0
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/types.ts +13 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { VneModule, VneModuleClass, VneNamespace, VnePluginConstants, VnePluginConstantsMap, VnePluginConstantsMapRegistry, VnePluginConstantsRegistry, VnePluginEvents, VnePluginEventsMap, VnePluginEventsMapRegistry, VnePluginEventsRegistry, VnePluginParams, VnePluginParamsMap, VnePluginParamsMapRegistry, VnePluginParamsRegistry, VnePluginSettings, VnePluginSettingsMap, VnePluginSettingsMapRegistry, VnePluginSettingsRegistry, VnePluginShape, VneRegistry, } from "./types.js";
|
|
1
|
+
export type { VneModule, VneModuleClass, VneNamespace, VnePluginConstants, VnePluginConstantsMap, VnePluginConstantsMapRegistry, VnePluginConstantsRegistry, VnePluginEvents, VnePluginEventsMap, VnePluginEventsMapRegistry, VnePluginEventsRegistry, VnePluginParams, VnePluginParamsMap, VnePluginParamsMapRegistry, VnePluginParamsRegistry, VnePluginSettings, VnePluginSettingsMap, VnePluginSettingsMapRegistry, VnePluginSettingsRegistry, VnePluginShape, VneRegistry, Widen, } from "./types.js";
|
|
2
2
|
import type { VneModuleClass, VneNamespace, VnePluginShape, VneRegistry } from "./types.js";
|
|
3
3
|
export declare const VNE_MODULES: VneModuleClass[];
|
|
4
4
|
export declare const VNE: VneRegistry;
|
package/dist/types.d.ts
CHANGED
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
* // Namespace and event keys may be unset until regPlugin runs:
|
|
18
18
|
* VNE.EVENTS.STORAGE?.CLEAR
|
|
19
19
|
*/
|
|
20
|
+
/** Makes PARAMS default values mutable at runtime; numbers and booleans keep a wide primitive type. */
|
|
21
|
+
export type Widen<T> = T extends (...args: infer A) => infer R ? (...args: A) => R : T extends number ? number : T extends boolean ? boolean : T extends readonly (infer U)[] ? Widen<U>[] : T extends object ? {
|
|
22
|
+
-readonly [K in keyof T]: Widen<T[K]>;
|
|
23
|
+
} : T;
|
|
20
24
|
export interface VnePluginConstantsMap {
|
|
21
25
|
}
|
|
22
26
|
export interface VnePluginEventsMap {
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/src/types.ts
CHANGED
|
@@ -17,6 +17,19 @@
|
|
|
17
17
|
* // Namespace and event keys may be unset until regPlugin runs:
|
|
18
18
|
* VNE.EVENTS.STORAGE?.CLEAR
|
|
19
19
|
*/
|
|
20
|
+
/** Makes PARAMS default values mutable at runtime; numbers and booleans keep a wide primitive type. */
|
|
21
|
+
export type Widen<T> = T extends (...args: infer A) => infer R
|
|
22
|
+
? (...args: A) => R
|
|
23
|
+
: T extends number
|
|
24
|
+
? number
|
|
25
|
+
: T extends boolean
|
|
26
|
+
? boolean
|
|
27
|
+
: T extends readonly (infer U)[]
|
|
28
|
+
? Widen<U>[]
|
|
29
|
+
: T extends object
|
|
30
|
+
? { -readonly [K in keyof T]: Widen<T[K]> }
|
|
31
|
+
: T;
|
|
32
|
+
|
|
20
33
|
export interface VnePluginConstantsMap {}
|
|
21
34
|
export interface VnePluginEventsMap {}
|
|
22
35
|
export interface VnePluginSettingsMap {}
|