@ryupold/vode 0.13.0 → 0.13.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/vode.ts +4 -4
package/package.json
CHANGED
package/src/vode.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export type Vode<S> = FullVode<S> | JustTagVode | NoPropsVode<S>;
|
|
2
|
-
export type ChildVode<S> = Vode<S> | TextVode | NoVode | Component<S>;
|
|
3
2
|
export type FullVode<S> = [tag: Tag, props: Props<S>, ...children: ChildVode<S>[]];
|
|
4
3
|
export type NoPropsVode<S> = [tag: Tag, ...children: ChildVode<S>[]] | string[];
|
|
5
4
|
export type JustTagVode = [tag: Tag];
|
|
5
|
+
export type ChildVode<S> = Vode<S> | TextVode | NoVode | Component<S>;
|
|
6
6
|
export type TextVode = string;
|
|
7
7
|
export type NoVode = undefined | null | number | boolean | bigint | void;
|
|
8
8
|
export type AttachedVode<S> = Vode<S> & { node: ChildNode, id?: string } | Text & { node?: never, id?: never };
|
|
@@ -11,12 +11,12 @@ export type Component<S> = (s: S) => ChildVode<S>;
|
|
|
11
11
|
|
|
12
12
|
export type Patch<S> =
|
|
13
13
|
| NoRenderPatch // ignored
|
|
14
|
-
|
|
|
14
|
+
| RenderPatch<S>
|
|
15
15
|
| Promise<Patch<S>> | Effect<S>; // effects resulting in patches
|
|
16
16
|
|
|
17
17
|
export type NoRenderPatch = undefined | null | number | boolean | bigint | string | symbol | void;
|
|
18
|
-
|
|
19
|
-
export type DeepPartial<S> = { [P in keyof S]?: S[P] extends Array<infer I> ? Array<
|
|
18
|
+
export type RenderPatch<S> = {} | DeepPartial<S>;
|
|
19
|
+
export type DeepPartial<S> = { [P in keyof S]?: S[P] extends Array<infer I> ? Array<DeepPartial<I>> : DeepPartial<S[P]> };
|
|
20
20
|
|
|
21
21
|
export type Effect<S> =
|
|
22
22
|
| (() => Patch<S>)
|