Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function assertValidForeignQuery(foreign: any, dataName: string) {
if (foreign == null) {
return;
}
const { documentPath, entityName } = foreign;
assertNonEmptyString(
documentPath,
`${dataName}.foreign.documentPath must be a non-empty string.`
);
assertValidEntityName(entityName, `${dataName}.foreign`);
}
export const GeneralForeignQueryWrapper: typeof ForeignQueryWrapper = ForeignQueryWrapper;