import { NodeMap, ScopeMap } from "./createScopeMaps";
import { Reference, Node, Declarator, Declaration, Statement } from "./ast";
export declare const runtimeModuleName = "ionscript";
export declare function getNodesOfType<T>(root: any, predicate: (node: any) => node is T): T[];
export declare function memoizeIntern<A extends any, B>(fn: (a: A) => B): (a: A) => B;
export declare function memoize<A extends object, B>(fn: (a: A, ...rest: any[]) => B, cacheResultAsKey?: boolean, cache?: WeakMap<A, B>): (a: A) => B;
export declare function isValidId(name: string): boolean;
export declare function hasDeclarator(statements: Array<Statement>, name: string): boolean;
export declare function getOriginalDeclarator(declarator: Declarator, scopes: NodeMap<ScopeMap>, ancestors: Map<Node, Node>, throwErrors?: boolean): Declarator | null;
export declare function getDeclarator(ref: Reference, scopes: NodeMap<ScopeMap>, ancestors: Map<Node, Node>, traverseReferences?: boolean, throwError?: boolean): Declarator | null;
/**
 * Returns an array of self and ancestors where 0 == self and length - 1 = root
 */
export declare function getAncestorsAndSelfList(node: Node | undefined, ancestorsMap: Map<Node, Node>): Node[];
export declare function getAncestor<T>(node: Node, ancestors: Map<Node, Node>, predicate: (a: any) => a is T): T | null;
export declare function getOriginalDeclaration<T = Declaration>(ref: Reference, scopes: NodeMap<ScopeMap>, ancestors: Map<Node, Node>, predicate?: (a: any) => a is T): T | null;
export declare function clone(value: any): any;
export declare function freeze(object: any, deep?: boolean): void;
export declare function SemanticError(message: string, location: any): any;
export declare function toMap<V>(object: {
    [name: string]: V;
}): Map<string, V>;
export declare function mapValues<K, I, O>(object: Map<K, I>, fn: (I: any, K: any) => O): Map<K, O>;
export declare function getLast<T>(array: any[], predicate: (value: any) => value is T): T | null;
export declare function union(a: Set<any>, b: Set<any>): Set<any>;
export declare function intersection(a: Set<any>, b: Set<any>): Set<any>;
export declare function difference(a: Set<any>, b: Set<any>): Set<any>;
export declare function findPackage(dir?: string): any;
export declare function read(file: any): string;
export declare function getPathFromFilename(namespace: string, filename: string): string;
export declare function getInputFilesRecursive(directory: string | string[], namespace: string, rootDirectory?: string | null, allFiles?: {
    [path: string]: string;
}): {
    [path: string]: string;
};
export declare function exists(file: string): boolean;
export declare function makeDirectories(dir: string): void;
export declare function write(file: string, content: string, encoding?: string): void;
