Effect CommunityEC
Effect Community3y ago
3 replies
derrick

Issue with duplicate identifier error when importing 'effect' in TypeScript

I keep wanting to do
import { Option } from 'effect'
import { type Option } from 'effect/Option'

const thing: Option<string> = Option.some('thing')

But typescript gives me an error bc of the duplicate identifier. However, I don't get the duplicate identifier error when I do something like

type Whatever = { whatever : "whatever"}

const Whatever: Whatever = {whatever: 'whatever'}


What gives? Is there a way to do imports the way I want with effect?
Was this page helpful?