import { Options } from "../Compiler";
import Assembly from "../ast/Assembly";
import { CallExpression, Expression, Reference, RuntimeType, Statement, Type } from "../ast";
export declare function throwTypeError(type: Type, valueName: string): Statement;
export declare function typeCheckOrThrow(value: Expression, type: Type, name: string): Statement;
/**
 * Replaces nodes but returns original if none were replaced.
 */
export declare function replaceNodes(root: any, match: (a: any) => boolean, replacement: any): any;
export declare function toRuntimeType(type: any, name: string): CallExpression | RuntimeType | Reference;
export default function runtimeTypeChecking(root: Assembly, options: Options): any;
