/** * GENERATED CODE - DO NOT MODIFY */ import { type ValidationResult } from '@atproto/lexicon'; export type OmitKey = { [K2 in keyof T as K2 extends K ? never : K2]: T[K2]; }; export type $Typed = V & { $type: T; }; export type Un$Typed = OmitKey; export type $Type = Hash extends 'main' ? Id : `${Id}#${Hash}`; export type $TypedObject = V extends { $type: $Type; } ? V : V extends { $type?: string; } ? V extends { $type?: infer T extends $Type; } ? V & { $type: T; } : never : V & { $type: $Type; }; export declare function is$typed(v: V, id: Id, hash: Hash): v is $TypedObject; export declare function maybe$typed(v: V, id: Id, hash: Hash): v is V & object & { $type?: $Type; }; export type Validator = (v: unknown) => ValidationResult; export type ValidatorParam = V extends Validator ? R : never; /** * Utility function that allows to convert a "validate*" utility function into a * type predicate. */ export declare function asPredicate(validate: V): (v: T) => v is T & ValidatorParam; //# sourceMappingURL=util.d.ts.map