Removing `<A>` from `Effect.catchTag()`
Is there a way to throw away the
My current code is this:
<A><A> of Effect.catchTag()Effect.catchTag()?My current code is this:
const notifier = yield* _(
getNotifier(notification.id as NotificationId, target),
Effect.catchTag('UserDoesntExist', (a) =>
Effect.tryPromise({
try: () => {
console.log('Moving notification to admin target', a.userId);
return prisma.notification.update({
where: { id: notification.id },
data: { target: 'ADMIN' }
});
},
catch: (e) => new QueryError({ inner: e as Error })
})
)
);
// `notifier` now is `Notifier | Notification`, how do I prevent this?const notifier = yield* _(
getNotifier(notification.id as NotificationId, target),
Effect.catchTag('UserDoesntExist', (a) =>
Effect.tryPromise({
try: () => {
console.log('Moving notification to admin target', a.userId);
return prisma.notification.update({
where: { id: notification.id },
data: { target: 'ADMIN' }
});
},
catch: (e) => new QueryError({ inner: e as Error })
})
)
);
// `notifier` now is `Notifier | Notification`, how do I prevent this?