import type { $Type, $Typed, Unknown$TypedObject } from '@atproto/lex'; /** * The narrowing performed by {@link is$typedObject}: like lex-schema's * `MaybeTypedObject` (the narrowing of `TypedObjectSchema.isTypeOf`), except * `$type` is required on the result rather than optional. */ export type TypedObject = TValue extends { $type: TType; } ? TValue : $Typed, TType>; /** * Strict variant of `TypedObjectSchema.isTypeOf`, which we prefer because the * schema method matches when `$type` is missing — fine for discriminating * accurately-typed unions, but a footgun on imperfectly-typed data, where an * unrelated object silently "matches". This guard requires `$type` to be * present and equal to the schema's `$type` constant. * * @example * ```ts * prefs.find((p) => is$typedObject(p, adultContentPref.$type)) * ``` */ export declare function is$typedObject>(value: TValue, $type: TType): value is TypedObject; //# sourceMappingURL=types.d.ts.map