Effect CommunityEC
Effect Community3y ago
8 replies
wayne

Issue with Schema and Data Integration

Hi, I'm having a bit of a problem trying to get schema and data working together happily:
Here's my snippet:
import * as S from '@effect/schema/Schema'; import * as F from '@effect/data/Function'; import * as E from '@effect/data/Either'; F.pipe([['a', 'b']] as unknown, S.parseEither(S.array(S.tuple(S.string, S.string))), E.map(R.fromEntries) );

To which TS is complaining with: Type 'readonly (readonly [string, string])[]' is not assignable to type 'Iterable<[string, string]>'.ts(2345)

Am I doing something wrong here?
Was this page helpful?