import { EncodeData, Enum, IntrinsicScalarName, Model, ModelProperty, Operation, Program, Scalar, TemplatedTypeBase, Type, TypeNameOptions, Union, UnionVariant } from "@typespec/compiler";
import { SchemaContext } from "@autorest/codemodel";
import { DurationSchema } from "./common/schemas/time.js";
/** Acts as a cache for processing inputs.
 *
 * If the input is undefined, the output is always undefined.
 * for a given input, the process is only ever called once.
 *
 *
 */
export declare class ProcessingCache<In, Out> {
    private transform;
    private results;
    constructor(transform: (orig: In, ...args: Array<any>) => Out);
    has(original: In | undefined): boolean;
    set(original: In, result: Out): Out;
    process(original: In | undefined, ...args: Array<any>): Out | undefined;
}
/** adds only if the item is not in the collection already
 *
 * @note  While this isn't very efficient, it doesn't disturb the original
 * collection, so you won't get inadvertent side effects from using Set, etc.
 */
export declare function pushDistinct<T>(targetArray: Array<T>, ...items: Array<T>): Array<T>;
export declare function modelContainsDerivedModel(model: Model): boolean;
export declare function isModelReferredInTemplate(template: TemplatedTypeBase, target: Model): boolean;
export declare function getNameForTemplate(target: Type): string;
export declare function isNullableType(type: Type): boolean;
export declare function isSameLiteralTypes(variants: UnionVariant[]): boolean;
export declare function getDurationFormat(encode: EncodeData): DurationSchema["format"];
export declare function hasScalarAsBase(type: Scalar, scalarName: IntrinsicScalarName): boolean;
export declare function unionReferredByType(program: Program, type: Type, cache: Map<Type, Union | null | undefined>): Union | null;
export declare function getUnionDescription(union: Union, typeNameOptions: TypeNameOptions): string;
export declare function getModelNameForProperty(property: ModelProperty): string;
export declare function modelIs(model: Model, name: string, namespace: string): boolean;
export declare function getAccess(type: Model | Operation | Enum): string | undefined;
export declare function isAllValueInteger(values: number[]): boolean;
export declare function getUsage(type: Model | Operation | Enum): SchemaContext[] | undefined;
//# sourceMappingURL=type-utils.d.ts.map