import type { MirrorFn } from '../schema/shared/types/functions.js'; import type { InferBeatmapSerial, InferBeatmapVersion, InferBeatmapWrapper } from '../schema/shared/types/infer.js'; import type { BeatmapFileType } from '../schema/shared/types/schema.js'; import type { ICompatibilityOptions } from '../mapping/types/compatibility.js'; import type { IOptimizeOptions } from '../mapping/types/optimize.js'; import type { ISchemaCheckOptions } from '../mapping/types/schema.js'; export interface ISaveOptions, TWrapper = Record, TSerial = Record> { /** * Prettify format JSON. * * @default 0 */ format?: number; /** * Force convert beatmap version if mismatched. * * @default true */ forceConvert?: boolean; /** Validate class object integrity when saving. */ validate?: Partial; /** Optimization option when saving. */ optimize?: Partial; /** * Sort the objects in array with the correct order. * * @default true */ sort?: boolean; /** * Perform any preprocessing to object before transformed into JSON. * * **Warning**: This may result in side-effects. * * @default [] */ preprocess?: [ ((data: TWrapper, version?: TVersion | null) => InferBeatmapWrapper), ...MirrorFn>[] ]; /** * Perform any postprocessing after transformed into JSON. * * @default [] */ postprocess?: [ ...MirrorFn>[], ((data: InferBeatmapSerial, version?: TVersion | null) => TSerial) ]; } export interface ISaveValidate { /** * Enable class object validation check. * * @default true */ enabled?: boolean; /** * Check if beatmap is valid in vanilla. * * @default false */ vanilla?: boolean; compatibility?: ICompatibilityOptions; schemaCheck?: ISchemaCheckOptions; } //# sourceMappingURL=types.d.ts.map