Effect CommunityEC
Effect Community3y ago
46 replies
Almaju

Issue with Upgrading Effect Version and Using Context in TypeScript

Hello everyone! I upgraded the version of effect and it looks like I cannot do that anymore:
type Now = () => Date;
export const Now = Context.Tag<"Now", Now>()

const fn = pipe(Effect.flatMap(Now, now => now());

I now get:
Argument of type 'Tag<"Now", Now>' is not assignable to parameter of type 'EffectAny...
How is the new way of doing that? 🥺
Was this page helpful?