Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
status: (() => {
switch (confirmation.type) {
case Confirmation.Type.DELIVERED:
return StatusType.DELIVERED;
case Confirmation.Type.READ:
return StatusType.SEEN;
default:
const message = `Confirmation type "${confirmation.type}" is unknown.`;
throw new z.error.CryptographyError(z.error.CryptographyError.TYPE.UNHANDLED_TYPE, message);
}
})(),
},
status: (() => {
switch (confirmation.type) {
case Confirmation.Type.DELIVERED:
return StatusType.DELIVERED;
case Confirmation.Type.READ:
return StatusType.SEEN;
default:
const message = `Confirmation type "${confirmation.type}" is unknown.`;
throw new z.error.CryptographyError(z.error.CryptographyError.TYPE.UNHANDLED_TYPE, message);
}
})(),
},