Effect CommunityEC
Effect Community2y ago
7 replies
Steff

Syntax Error with yield in Do..bind Notation

When using a yield inside a Do..bind notation, I got a
Syntax Error: Unexpected strict mode reserved word yield:
const test = Effect.gen(function* ($) {
  return yield* $(
    Effect.Do,
    Effect.bind("foo", () =>
      Effect.succeed({ firstName: yield* $(Effect.succeed("foo")) })
    )
  );
});
Was this page helpful?