This commit upgrades TypeScript to the latest version 5.3 and introduces `verbatimModuleSyntax` in line with the official Vue guide recommendatinos (vuejs/docs#2592). By enforcing `import type` for type-only imports, this commit improves code clarity and supports tooling optimization, ensuring imports are only bundled when necessary for runtime. Changes: - Bump TypeScript to 5.3.3 across the project. - Adjust import statements to utilize `import type` where applicable, promoting cleaner and more efficient code.
48 lines
1.2 KiB
TypeScript
48 lines
1.2 KiB
TypeScript
import type { HierarchyAccess } from '@/presentation/components/Scripts/View/Tree/TreeView/Node/Hierarchy/HierarchyAccess';
|
|
import type { TreeNode } from '@/presentation/components/Scripts/View/Tree/TreeView/Node/TreeNode';
|
|
|
|
export class HierarchyAccessStub implements HierarchyAccess {
|
|
public parent: TreeNode | undefined = undefined;
|
|
|
|
public children: readonly TreeNode[] = [];
|
|
|
|
public depthInTree = 0;
|
|
|
|
public isLeafNode = true;
|
|
|
|
public isBranchNode = false;
|
|
|
|
public setParent(parent: TreeNode): void {
|
|
this.parent = parent;
|
|
}
|
|
|
|
public setChildren(children: readonly TreeNode[]): void {
|
|
this.children = children;
|
|
}
|
|
|
|
public withParent(parent: TreeNode | undefined): this {
|
|
this.parent = parent;
|
|
return this;
|
|
}
|
|
|
|
public withDepthInTree(depthInTree: number): this {
|
|
this.depthInTree = depthInTree;
|
|
return this;
|
|
}
|
|
|
|
public withChildren(children: readonly TreeNode[]): this {
|
|
this.setChildren(children);
|
|
return this;
|
|
}
|
|
|
|
public withIsBranchNode(value: boolean): this {
|
|
this.isBranchNode = value;
|
|
return this;
|
|
}
|
|
|
|
public withIsLeafNode(value: boolean): this {
|
|
this.isLeafNode = value;
|
|
return this;
|
|
}
|
|
}
|