import { Spec, Specs } from '../types';
import { BaseSpec } from '../types/BaseSpec';
import { Dict } from '../types/Dict';
import { GraphSpec } from '../types/GraphSpec';
import { IOOf } from '../types/IOOf';
import { TreeNode } from './parser';
export type TypeInterface = IOOf<Dict<string>>;
export type TypeTreeInterface = IOOf<Dict<TreeNode>>;
export type TypeTreeInterfaceCache = Dict<TypeTreeInterface>;
export declare const getSpecTypeInterfaceById: (id: string, specs: Specs, cache?: TypeTreeInterfaceCache, visited?: {
    [id: string]: true;
}) => TypeInterface;
export declare const _getSpecTypeInterfaceById: (id: string, specs: Specs, cache?: TypeTreeInterfaceCache, visited?: {
    [id: string]: true;
}) => TypeTreeInterface;
export declare const typeTreeToType: (typeTreeInterface: TypeTreeInterface) => TypeInterface;
export declare const typeTreeMapToTypeMap: (graphTypeTree: TypeTreeMap) => TypeMap;
export declare const _getSpecTypeInterface: (spec: Spec, specs: Specs, cache?: TypeTreeInterfaceCache, visited?: {
    [id: string]: true;
}) => TypeTreeInterface;
export declare const _getBaseTypeInterfaceById: (id: string, specs: Specs) => TypeTreeInterface;
export declare const _getBaseTypeInterface: (spec: BaseSpec) => TypeTreeInterface;
export declare const _getGraphTypeInterfaceById: (id: string, specs: Specs, cache?: TypeTreeInterfaceCache, visited?: {
    [id: string]: true;
}) => TypeTreeInterface;
export declare const getGraphTypeInterface: (spec: GraphSpec, specs: Specs, cache?: TypeTreeInterfaceCache, visited?: {
    [id: string]: true;
}) => TypeInterface;
export declare const _getGraphTypeInterface: (spec: GraphSpec, specs: Specs, cache?: TypeTreeInterfaceCache, visited?: {
    [id: string]: true;
}) => TypeTreeInterface;
export declare const createGenericTypeInterface: (id: string, specs: Specs) => TypeTreeInterface;
export declare const isMoreSpecific: (a: string, b: string) => boolean;
export declare const _isMoreSpecific: (a: TreeNode, b: TreeNode) => boolean;
export declare const mostSpecific: (a: string, b: string) => string;
export declare const _mostSpecific: (a: TreeNode, b: TreeNode) => TreeNode;
export declare const leastSpecific: (a: string, b: string) => string;
export declare const _leastSpecific: (a: TreeNode, b: TreeNode) => TreeNode;
export type TypeTreeMap = Dict<TypeTreeInterface>;
export type TypeMap = Dict<TypeInterface>;
export declare const getGraphTypeMapById: (id: string, specs: Specs, cache?: TypeTreeInterfaceCache, visited?: {
    [id: string]: true;
}) => TypeMap;
export declare const _getGraphTypeMapById: (id: string, specs: Specs, cache?: TypeTreeInterfaceCache, visited?: {
    [id: string]: true;
}) => TypeTreeMap;
export declare const getGraphTypeMap: (spec: GraphSpec, specs: Specs, cache?: TypeTreeInterfaceCache, visited?: {
    [id: string]: true;
}) => TypeMap;
export declare const _getGraphTypeMap: (spec: GraphSpec, specs: Specs, cache?: TypeTreeInterfaceCache, visited?: {
    [id: string]: true;
}) => TypeTreeMap;
export type Subgraph = {
    unit: Dict<boolean>;
    merge: Dict<boolean>;
};
export declare const getSubgraphs: (spec: GraphSpec) => Subgraph[];
