/var/www/greso.tech/server/nsm/node_modules/@firebase/database/dist/src/core/util
NameSizeModeActions
libs/-0755rm
EventEmitter.d.ts15330644editdlrm
ImmutableTree.d.ts42480644editdlrm
misc.d.ts6830644editdlrm
NextPushId.d.ts15170644editdlrm
OnlineMonitor.d.ts12070644editdlrm
Path.d.ts34920644editdlrm
ServerValues.d.ts21580644editdlrm
SortedMap.d.ts112490644editdlrm
Tree.d.ts38490644editdlrm
util.d.ts72860644editdlrm
validation.d.ts32770644editdlrm
VisibilityMonitor.d.ts8760644editdlrm
Edit: /var/www/greso.tech/server/nsm/node_modules/@firebase/database/dist/src/core/util/Tree.d.ts (3849B)
/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { Path } from './Path'; /** * Node in a Tree. */ export interface TreeNode { children: Record>; childCount: number; value?: T; } /** * A light-weight tree, traversable by path. Nodes can have both values and children. * Nodes are not enumerated (by forEachChild) unless they have a value or non-empty * children. */ export declare class Tree { readonly name: string; readonly parent: Tree | null; node: TreeNode; /** * @param name - Optional name of the node. * @param parent - Optional parent node. * @param node - Optional node to wrap. */ constructor(name?: string, parent?: Tree | null, node?: TreeNode); } /** * Returns a sub-Tree for the given path. * * @param pathObj - Path to look up. * @returns Tree for path. */ export declare function treeSubTree(tree: Tree, pathObj: string | Path): Tree; /** * Returns the data associated with this tree node. * * @returns The data or null if no data exists. */ export declare function treeGetValue(tree: Tree): T | undefined; /** * Sets data to this tree node. * * @param value - Value to set. */ export declare function treeSetValue(tree: Tree, value: T | undefined): void; /** * @returns Whether the tree has any children. */ export declare function treeHasChildren(tree: Tree): boolean; /** * @returns Whethe rthe tree is empty (no value or children). */ export declare function treeIsEmpty(tree: Tree): boolean; /** * Calls action for each child of this tree node. * * @param action - Action to be called for each child. */ export declare function treeForEachChild(tree: Tree, action: (tree: Tree) => void): void; /** * Does a depth-first traversal of this node's descendants, calling action for each one. * * @param action - Action to be called for each child. * @param includeSelf - Whether to call action on this node as well. Defaults to * false. * @param childrenFirst - Whether to call action on children before calling it on * parent. */ export declare function treeForEachDescendant(tree: Tree, action: (tree: Tree) => void, includeSelf?: boolean, childrenFirst?: boolean): void; /** * Calls action on each ancestor node. * * @param action - Action to be called on each parent; return * true to abort. * @param includeSelf - Whether to call action on this node as well. * @returns true if the action callback returned true. */ export declare function treeForEachAncestor(tree: Tree, action: (tree: Tree) => unknown, includeSelf?: boolean): boolean; /** * Does a depth-first traversal of this node's descendants. When a descendant with a value * is found, action is called on it and traversal does not continue inside the node. * Action is *not* called on this node. * * @param action - Action to be called for each child. */ export declare function treeForEachImmediateDescendantWithValue(tree: Tree, action: (tree: Tree) => void): void; /** * @returns The path of this tree node, as a Path. */ export declare function treeGetPath(tree: Tree): any;