import { Specs } from '../types';
import { Dict } from '../types/Dict';
export declare enum TreeNodeType {
    Invalid = "invalid",
    Null = "null",
    Generic = "generic",
    Identifier = "identifier",
    Expression = "expression",
    ArrayExpression = "array expression",
    ObjectExpression = "object expression",
    Or = "or",
    And = "and",
    Object = "object",
    String = "string",
    Number = "number",
    Boolean = "boolean",
    Class = "class",
    StringLiteral = "string literal",
    BooleanLiteral = "boolean literal",
    NumberLiteral = "number literal",
    ObjectLiteral = "object literal",
    ArrayLiteral = "array literal",
    ClassLiteral = "class literal",
    KeyValue = "key value",
    Regex = "regex",
    RegexLiteral = "regex literal",
    Date = "date",
    DateLiteral = "date literal",
    Time = "time",
    Unit = "unit",
    Any = "any",
    PropExpression = "prop expression",
    ArithmeticExpression = "arithmetic expression",
    Url = "url"
}
export type TreeNode<T = string> = {
    value: T;
    type: TreeNodeType;
    children: TreeNode<T>[];
};
export type RawTreeNode = TreeNode<any>;
export declare const COMMA = ",";
export declare const DOUBLE_QUOTE = "\"";
export declare const SINGLE_QUOTE = "'";
export declare const OBJECT_OPEN = "{";
export declare const OBJECT_CLOSE = "}";
export declare const ARRAY_OPEN = "[";
export declare const ARRAY_CLOSE = "]";
export declare const PARENTHESIS_OPEN = "(";
export declare const PARENTHESIS_CLOSE = ")";
export declare function traverseTree(root: TreeNode, callback: (node: TreeNode, path: number[]) => void, path?: number[]): void;
export declare function printTree(data: string): void;
export declare function isCompositeType(type: TreeNodeType): boolean;
export declare function isGeneric(type: string): boolean;
export declare function hasGeneric(type: string): boolean;
export declare function _isGeneric(tree: TreeNode): boolean;
export declare function _hasGeneric(tree: TreeNode): boolean;
export declare function _isValueOfType(value: TreeNode, type: TreeNode): boolean;
export declare function isValueOfType(value: string, type: string): boolean;
export declare function isValidType(type: string): boolean;
export declare function getTreeNodeType(value: string): TreeNodeType;
export declare function isLiteralType(type: TreeNodeType): boolean;
export declare function getLiteralType(type: TreeNodeType): TreeNodeType;
export declare const checkClassInheritance: (sourceClass: string, targetClass: string) => any;
export declare function _isTypeMatch(specs: Specs, source: TreeNode, target: TreeNode): boolean;
export declare function isTypeMatch(specs: Specs, source: string, target: string): boolean;
export declare function _isValidTree(value: TreeNode): boolean;
export declare function isValidTree(value: string): boolean;
export declare function _isValidValue(tree: TreeNode, _getTree?: (value: string, keyValue?: boolean, ignoreKeyword?: boolean) => TreeNode): boolean;
export declare function _isValidType(tree: TreeNode): boolean;
export declare function isValidValue(value: string): boolean;
export declare function isValidObjValue(type: string): boolean;
export declare function _isValidObjKeyType(tree: TreeNode): boolean;
export declare function isValidObjKey(key: string): boolean;
export declare function _isKey(root: TreeNode, path: number[]): boolean;
export declare function isKey(root: string, path: number[]): boolean;
export declare function isValidBooleanStr(str: string): boolean;
export declare function isValidNumberStr(str: string): boolean;
export declare function isValidStringStr(str: string): boolean;
export declare function isValidIdentifierStr(str: string): boolean;
export declare function isValidKeyStr(str: string): boolean;
export declare function getTree(value: string, keyValue?: boolean, ignoreKeyword?: boolean): TreeNode;
export declare function _getTypeTree(value: string, keyValue?: boolean, ignoreKeyword?: boolean): TreeNode | undefined;
export declare function getValueTree(value: string, keyValue?: boolean, ignoreKeyword?: boolean, _getTree?: (value: string, keyValue?: boolean, ignoreKeyword?: boolean) => TreeNode): TreeNode;
export declare function _extractGenerics(specs: Specs, value: TreeNode, type: TreeNode): Dict<string>;
export declare const NULL_TREE: {
    value: string;
    type: TreeNodeType;
    children: any[];
};
export declare const STRING_TREE: {
    value: string;
    type: TreeNodeType;
    children: any[];
};
export declare const BOOLEAN_TREE: {
    value: string;
    type: TreeNodeType;
    children: any[];
};
export declare const NUMBER_TREE: {
    value: string;
    type: TreeNodeType;
    children: any[];
};
export declare const ANY_TREE: {
    value: string;
    type: TreeNodeType;
    children: any[];
};
export declare const REGEX_TREE: {
    value: string;
    type: TreeNodeType;
    children: any[];
};
export declare const OBJECT_TREE: {
    value: string;
    type: TreeNodeType;
    children: any[];
};
export declare function _getValueType(specs: Specs, tree: TreeNode): TreeNode;
export declare function getValueType(specs: Specs, value: string): string;
export declare function _stringify(tree: TreeNode): string;
export declare function _filterEmptyNodes(tree: TreeNode, _getTree?: (value: string, keyValue?: boolean, ignoreKeyword?: boolean) => TreeNode): [TreeNode, number];
export declare function filterEmptyNodes(value: string): TreeNode;
export declare function findGenerics(value: string): Set<string>;
export declare function _findGenerics(tree: TreeNode): Set<string>;
export declare function extractGenerics(specs: Specs, value: string, type: string): Dict<string>;
export declare function _applyGenerics(tree: TreeNode, map: {
    [name: string]: string;
}): TreeNode;
export declare function applyGenerics(type: string, map: {
    [name: string]: string;
}): string;
export declare function _getNodeAtPath(root: TreeNode, path: number[]): TreeNode | null;
export declare function getNodeAtPath(data: string, path: number[]): string | null;
export declare function _getNextNode(node: TreeNode, path: number[], direction: 1 | -1): TreeNode | null;
export declare function getNextNode(data: string, path: number[], direction: 1 | -1): string | null;
export declare function _getNextNodePath(root: TreeNode, path: number[], direction: 1 | -1): number[] | null;
export declare function getNextNodePath(data: string, path: number[], direction: 1 | -1): number[] | null;
export declare function _getNextLeafPath(root: TreeNode, path: number[], direction: 1 | -1): number[] | null;
export declare function getNextLeafPath(data: string, path: number[], direction: 1 | -1): number[] | null;
export declare function _getNextSiblingPath(tree: TreeNode, path: number[], direction: 1 | -1): number[];
export declare function getNextSiblingPath(value: string, path: number[], direction: 1 | -1): number[] | null;
export declare function getParentPath(path: number[]): number[] | null;
export declare function getParent(root: string, path: number[]): string | null;
export declare function _getLastLeaf(root: TreeNode): TreeNode;
export declare function _getLastLeafPath(root: TreeNode): number[];
export declare function getLastLeafPath(root: string): number[];
export declare function getLastLeaf(root: string): string;
export declare function _getParent(root: TreeNode, path: number[]): TreeNode | null;
export declare function _insertNodeAt(root: TreeNode, path: number[], node: TreeNode): TreeNode;
export declare function insertNodeAt(root: string, path: number[], node: string): string;
export declare function _updateNodeAt(root: TreeNode, path: number[], update: TreeNode): TreeNode;
export declare function updateNodeAt(root: string, path: number[], update: string): string;
export declare const EMPTY_TREE: TreeNode<string>;
export declare function _removeNodeAt(root: TreeNode, path: number[]): TreeNode;
export declare function removeNodeAt(root: string, path: number[]): string;
export declare function _matchAllExcTypes(specs: Specs, a: TreeNode[], b: TreeNode[]): [number, number][][];
export declare function matchAllExcTypes(specs: Specs, a: string[], b: string[]): [number, number][][];
export declare function findAllUnitNodes(tree: TreeNode): number[][];
export declare function findAndReplaceUnitNodes_(tree: TreeNode): [number[][], TreeNode];
export declare function findAndReplaceUnitNodes(value: string): [number[][], TreeNode];
export declare function findAllNodes(tree: TreeNode, predicate: (node: TreeNode, path: number[]) => boolean): number[][];
