Type of the file
set to true to disable loader
file name to load
set to false if need errors
optional logger
optional validator for data (Record<string, string | undefined>)
// using zod
const stringRecordSchema = z.record(z.string().min(1), z.string());
const validate: ValidateCallback<Record<string, string>> = async (data) => {
const result = await stringRecordSchema.safeParseAsync(data);
if (!result.success) {
return {success: false, message: result.error.message};
}
return {success: true};
};
set to true to watch file for changes
Options for the AbstractFileRecordLoader.
Since
v1.0.0