vasille-web 4.1.3 → 4.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/fake-types/index.d.ts +6 -36
- package/package.json +1 -1
- package/types/jsx-runtime.d.ts +1 -1
package/fake-types/index.d.ts
CHANGED
|
@@ -98,18 +98,9 @@ export declare function ElseIf(props: { $condition: unknown; slot?: unknown }):
|
|
|
98
98
|
export declare function Else(props: { slot?: unknown }): void;
|
|
99
99
|
|
|
100
100
|
/** Renders content several times using a model (array, map or set) */
|
|
101
|
-
export declare function For<T>(props: {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}): void;
|
|
105
|
-
export declare function For<T>(props: {
|
|
106
|
-
of: ReadonlySet<DeepReadonly<T>>;
|
|
107
|
-
slot?: (value: DeepReadonly<T>) => void;
|
|
108
|
-
}): void;
|
|
109
|
-
export declare function For<K, T>(props: {
|
|
110
|
-
of: ReadonlyMap<DeepReadonly<K>, DeepReadonly<T>>;
|
|
111
|
-
slot?: (value: DeepReadonly<T>, index: DeepReadonly<K>) => void;
|
|
112
|
-
}): void;
|
|
101
|
+
export declare function For<T>(props: { of: readonly T[]; slot?: (value: T) => void }): void;
|
|
102
|
+
export declare function For<T>(props: { of: ReadonlySet<T>; slot?: (value: T) => void }): void;
|
|
103
|
+
export declare function For<K, T>(props: { of: ReadonlyMap<K, T>; slot?: (value: T, index: K) => void }): void;
|
|
113
104
|
|
|
114
105
|
/** Refresh the content each time then the reactive model is updated */
|
|
115
106
|
export declare function Watch<T>(props: { $model: T; slot?: (value: T) => void }): void;
|
|
@@ -120,35 +111,14 @@ export declare function Debug(props: { $model: unknown }): void;
|
|
|
120
111
|
/** Render content after a while */
|
|
121
112
|
export declare function Delay(props: { time?: number; slot?: unknown }): void;
|
|
122
113
|
|
|
123
|
-
export type DeepReadonly<T> =
|
|
124
|
-
T extends Map<infer K, infer V>
|
|
125
|
-
? ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>>
|
|
126
|
-
: T extends ReadonlyMap<infer K, infer V>
|
|
127
|
-
? ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>>
|
|
128
|
-
: T extends WeakMap<infer K, infer V>
|
|
129
|
-
? WeakMap<DeepReadonly<K>, DeepReadonly<V>>
|
|
130
|
-
: T extends Set<infer U>
|
|
131
|
-
? ReadonlySet<DeepReadonly<U>>
|
|
132
|
-
: T extends ReadonlySet<infer U>
|
|
133
|
-
? ReadonlySet<DeepReadonly<U>>
|
|
134
|
-
: T extends WeakSet<infer U>
|
|
135
|
-
? WeakSet<DeepReadonly<U>>
|
|
136
|
-
: T extends Promise<infer U>
|
|
137
|
-
? Promise<DeepReadonly<U>>
|
|
138
|
-
: T extends (...args: unknown[]) => unknown
|
|
139
|
-
? T
|
|
140
|
-
: T extends {}
|
|
141
|
-
? { readonly [K in keyof T]: DeepReadonly<T[K]> }
|
|
142
|
-
: T;
|
|
143
|
-
|
|
144
114
|
/** Stores a singleton state to memory */
|
|
145
|
-
export declare function store<Return extends object>(fn: () => Return):
|
|
115
|
+
export declare function store<Return extends object>(fn: () => Return): Return;
|
|
146
116
|
|
|
147
117
|
/** Creates a model (state) constructor */
|
|
148
|
-
export declare function model<Return extends object>(fn: () => Return): () =>
|
|
118
|
+
export declare function model<Return extends object>(fn: () => Return): () => Return;
|
|
149
119
|
export declare function model<Input extends object, Return extends object>(
|
|
150
120
|
fn: (input: Input) => Return,
|
|
151
|
-
): (input: Input) =>
|
|
121
|
+
): (input: Input) => Return;
|
|
152
122
|
|
|
153
123
|
export { QueryParams, ScreenProps, RouteParameters } from "vasille-router";
|
|
154
124
|
export { Router, NavigationMode } from "vasille-router/web-router";
|
package/package.json
CHANGED
package/types/jsx-runtime.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ type HtmlInput<K extends keyof HTMLElementTagNameMap & keyof HtmlTagMap> = {
|
|
|
14
14
|
slot?: unknown;
|
|
15
15
|
} & Partial<HtmlTagMap[K]["attrs"]> & prefixedObject<EventHandlers<HtmlTagMap[K]["events"]>, "on"> & Partial<prefixedObject<HtmlTagMap[K]["props"], "bind:">>;
|
|
16
16
|
export declare namespace JSX {
|
|
17
|
-
type ElementType = keyof IntrinsicElements | ((props
|
|
17
|
+
type ElementType = keyof IntrinsicElements | ((props: any) => void);
|
|
18
18
|
type Element = never;
|
|
19
19
|
type ElementClass = never;
|
|
20
20
|
interface ElementChildrenAttribute {
|