wraplet 0.25.0 → 0.26.0
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.
|
@@ -6,8 +6,8 @@ import { ChildInstance } from "./types/ChildInstance";
|
|
|
6
6
|
import { Groupable, GroupableSymbol, GroupExtractor } from "./types/Groupable";
|
|
7
7
|
import { NodeTreeParent, NodeTreeParentSymbol } from "./types/NodeTreeParent";
|
|
8
8
|
import { Core } from "./types/Core";
|
|
9
|
-
export declare abstract class AbstractWraplet<
|
|
10
|
-
protected core: Core<
|
|
9
|
+
export declare abstract class AbstractWraplet<N extends Node = Node, M extends WrapletChildrenMap = {}> implements Wraplet<N>, Groupable, NodeTreeParent {
|
|
10
|
+
protected core: Core<N, M>;
|
|
11
11
|
[WrapletSymbol]: true;
|
|
12
12
|
[GroupableSymbol]: true;
|
|
13
13
|
[NodeTreeParentSymbol]: true;
|
|
@@ -21,7 +21,7 @@ export declare abstract class AbstractWraplet<M extends WrapletChildrenMap = {},
|
|
|
21
21
|
* This is the log of all node accessors, available for easier debugging.
|
|
22
22
|
*/
|
|
23
23
|
private __debugNodeAccessors;
|
|
24
|
-
constructor(core: Core<
|
|
24
|
+
constructor(core: Core<N, M>);
|
|
25
25
|
getNodeTreeChildren(): Wraplet[];
|
|
26
26
|
setGroupsExtractor(callback: GroupExtractor): void;
|
|
27
27
|
getGroups(): string[];
|
|
@@ -52,6 +52,6 @@ export declare abstract class AbstractWraplet<M extends WrapletChildrenMap = {},
|
|
|
52
52
|
* @protected
|
|
53
53
|
*/
|
|
54
54
|
protected isChildInstance<K extends keyof M>(item: ChildInstance<M, keyof M>, actualUnknownId: keyof M, onlyId?: K | null): item is ChildInstance<M, K>;
|
|
55
|
-
protected static createCore<N extends Node, M extends WrapletChildrenMap>(node: N, map: M): Core<
|
|
56
|
-
protected static createWraplets<N extends Node, T extends AbstractWraplet<
|
|
55
|
+
protected static createCore<N extends Node, M extends WrapletChildrenMap>(node: N, map: M): Core<N, M>;
|
|
56
|
+
protected static createWraplets<N extends Node, T extends AbstractWraplet<N, any> = never>(node: ParentNode, map: WrapletChildrenMap, attribute: string, additional_args?: unknown[]): T[];
|
|
57
57
|
}
|
package/dist/DefaultCore.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { Core, CoreSymbol } from "./types/Core";
|
|
|
8
8
|
import { NodeTreeParentSymbol } from "./types/NodeTreeParent";
|
|
9
9
|
import { MapWrapper } from "./Map/MapWrapper";
|
|
10
10
|
import { WrapletCreator } from "./types/WrapletCreator";
|
|
11
|
-
export declare class DefaultCore<
|
|
11
|
+
export declare class DefaultCore<N extends Node = Node, M extends WrapletChildrenMap = {}> implements Core<N, M> {
|
|
12
12
|
node: N;
|
|
13
13
|
[CoreSymbol]: true;
|
|
14
14
|
[NodeTreeParentSymbol]: true;
|
package/dist/types/Core.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export { CoreSymbol };
|
|
|
11
11
|
* Children manager interface that defines the public API for managing wraplet relationships
|
|
12
12
|
* and lifecycles.
|
|
13
13
|
*/
|
|
14
|
-
export interface Core<
|
|
14
|
+
export interface Core<N extends Node = Node, M extends WrapletChildrenMap = {}> extends NodeTreeParent {
|
|
15
15
|
[CoreSymbol]: true;
|
|
16
16
|
[NodeTreeParentSymbol]: true;
|
|
17
17
|
/**
|