thrownewValidationError("Format should be a proper object");
}
for(constkeyinformat){
if(!(keyinthis.collection.fields)){
thrownewValidationError(
`Invalid field name in filter: ${key}`
);
}
}
returnformatasFormatParam<T>;
}
// this method should only be used when dealing with user input. Otherwise use the `format` method, as it's type safe and any issues should arise during the build process