Effect CommunityEC
Effect Community3mo ago
13 replies
Jan Wilhelm

Type Errors with Atom and Result Namespaces in Effect Atom Example

Any idea why I'm getting type errors Cannot use namespace 'Atom' as a type.ts(2709) and Cannot use namespace 'Result' as a type.ts(2709) when using this effect atom example?

import { Atom, Result} from "@effect-atom/atom-react"
import { Effect } from "effect"

const countAtom: Atom<Result<number>> = Atom.make(Effect.gen(function*() {
  yield* Effect.logInfo("Calculating count...");
  return 5;
}))
Was this page helpful?