Spaces:
Paused
Paused
Download node_modules/@nestjs/common/pipes/file/file-validator.interface.d.ts from Leon4gr45/augmenttoolkit: direct link, hf CLI and curl.
- Browser
- Download file 860 Bytes
-
https://huggingface.co/spaces/Leon4gr45/augmenttoolkit/resolve/main/node_modules/%40nestjs/common/pipes/file/file-validator.interface.d.ts
- Command line
-
hf download hf://spaces/Leon4gr45/augmenttoolkit/node_modules/@nestjs/common/pipes/file/file-validator.interface.d.ts
-
curl -L -o file-validator.interface.d.ts https://huggingface.co/spaces/Leon4gr45/augmenttoolkit/resolve/main/node_modules/%40nestjs/common/pipes/file/file-validator.interface.d.ts
860 Bytes
| import { IFile } from './interfaces'; | |
| /** | |
| * Interface describing FileValidators, which can be added to a ParseFilePipe | |
| * | |
| * @see {ParseFilePipe} | |
| * @publicApi | |
| */ | |
| export declare abstract class FileValidator<TValidationOptions = Record<string, any>, TFile extends IFile = IFile> { | |
| protected readonly validationOptions: TValidationOptions; | |
| constructor(validationOptions: TValidationOptions); | |
| /** | |
| * Indicates if this file should be considered valid, according to the options passed in the constructor. | |
| * @param file the file from the request object | |
| */ | |
| abstract isValid(file?: TFile | TFile[] | Record<string, TFile[]>): boolean | Promise<boolean>; | |
| /** | |
| * Builds an error message in case the validation fails. | |
| * @param file the file from the request object | |
| */ | |
| abstract buildErrorMessage(file: any): string; | |
| } | |