import { Schema } from 'yup'; /** * Validator for an uploaded file (yup-specific). * * @deprecated Since 5.0.0-beta.51 — `YupFile` will be removed in v6. Validate * files with the framework's vendor-neutral `File` type and an `instanceof` * check instead (no yup required). A file field always arrives as an array; * check the array as a whole, as `YupFile` does, so an error stays under the * field name (a per-element check reports `avatar[0]`, not `avatar`): * * import { File } from '@adaptivestone/framework/types.js'; * const files = (v: unknown) => Array.isArray(v) && v.every((f) => f instanceof File); * // zod: z.custom(files, 'not a file') * // valibot: v.custom(files, 'not a file') * // yup: mixed().test('file', 'not a file', files) * * A missing field fails these checks; for an optional one, let `files` also * accept `undefined`. * * @example * request: yup.object().shape({ * someFile: new YupFile().required(), * }) */ declare class YupFile extends Schema { constructor(); } export { YupFile };