import { EncodeData, IntrinsicScalarName, Model, Scalar, TemplatedTypeBase, Type, UnionVariant } from "@typespec/compiler";
import { DurationSchema } from "./common/schemas/time";
/** 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;
//# sourceMappingURL=type-utils.d.ts.map