import * as TreeModel from 'tree-model'; import { Node } from 'tree-model'; export interface BaseOptions { debug?: string; instance?: any; } export interface TreeNodeOptions { id: string; title: string; customId?: number | string | null; parentId?: number | string | null; } export interface ConflictedOnDifferentBranchOptions extends Pick { } export interface ConflictedOnSameBranchOptions extends Pick { } export default class Base { protected options: BaseOptions; private readonly _debug; protected tree: TreeModel; protected rootNode: Node; constructor(options?: BaseOptions); protected isValidComponentId(componentId: string): boolean; protected setRoot(options: TreeNodeOptions): this; protected destroyNode(options: Pick): boolean; protected addChildNode(options: TreeNodeOptions): void; protected exist(componentId: string): boolean; protected findComponentIdBy(title: string): string | null; protected all(): {}; /** * * @param { ConflictedOnDifferentBranchOptions | ConflictedOnSameBranchOptions } options * @return { String | Null } */ protected getConflictedComponentId(options: ConflictedOnDifferentBranchOptions & ConflictedOnSameBranchOptions): string | null; /** * @description Print debug information * @param {Array} args - the rest arguments */ debug(...args: any[]): void; /** * @description uuid/v4 */ get id(): string; private different; private identical; }