UNPKG

@stryke/types

Version:

A package containing many base TypeScript type definitions that are shared across many projects.

51 lines (50 loc) 1.3 kB
import { ValidationDetail } from "./validations.mjs"; //#region src/file.d.ts type FileStatus = "initialized" | "validated" | "uploaded" | "failed"; /** * A type that representing a file object. */ type FileResult = { name: string; status: FileStatus; issues?: ValidationDetail[]; size?: number; mimeType?: string; lastModified?: number; } & ({ uri: string; file?: File; } | { uri?: string; file: File; }); /** * A valid `picomatch` glob pattern, or array of patterns. */ type FilterPattern = ReadonlyArray<string | RegExp> | string | RegExp | null; interface FileInputOutput { input: string; output: string; } /** * An interface got representing an asset files with glob patterns. */ type AssetGlob = Required<Omit<FileInputOutput, "input">> & Partial<Pick<FileInputOutput, "input">> & { /** * A glob pattern to match files. */ glob: string; /** * An array of glob patterns to ignore files. */ ignore?: string[]; /** * Include `.dot` files in normal matches and `globstar` matches. Note that an explicit dot in a portion of the pattern will always match dot files. * * @defaultValue true */ dot?: boolean; }; //#endregion export { AssetGlob, FileInputOutput, FileResult, FileStatus, FilterPattern }; //# sourceMappingURL=file.d.mts.map