import type { TypeAttributes } from "../attributes/TypeAttributes.js";
import type { BaseGraphRewriteBuilder } from "../GraphRewriting.js";
import type { Type } from "./Type.js";
import type { TypeGraph } from "./TypeGraph.js";
export type TypeRef = number;
export declare function isTypeRef(x: unknown): x is TypeRef;
export declare function makeTypeRef(graph: TypeGraph, index: number): TypeRef;
export declare function typeRefIndex(tref: TypeRef): number;
export declare function assertTypeRefGraph(tref: TypeRef, graph: TypeGraph): void;
export declare function derefTypeRef(tref: TypeRef, graphOrBuilder: TypeGraph | BaseGraphRewriteBuilder): Type;
export declare function attributesForTypeRef(tref: TypeRef, graphOrBuilder: TypeGraph | BaseGraphRewriteBuilder): TypeAttributes;
export declare function typeAndAttributesForTypeRef(tref: TypeRef, graphOrBuilder: TypeGraph | BaseGraphRewriteBuilder): [Type, TypeAttributes];
