Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build error using TS 5.6 #3848

Closed
erlangxk opened this issue Oct 27, 2024 · 6 comments · Fixed by #4190
Closed

build error using TS 5.6 #3848

erlangxk opened this issue Oct 27, 2024 · 6 comments · Fixed by #4190
Labels
bug Something isn't working

Comments

@erlangxk
Copy link

What version of Effect is running?

3.10.4

What steps can reproduce the bug?

have dependency of effect ts 3.10.4 and using TS 5.6

What is the expected behavior?

build correctly

What do you see instead?

../../node_modules/.pnpm/[email protected]/node_modules/effect/dist/dts/Utils.d.ts:69:22 - error TS2420: Class 'SingleShotGen<T, A>' incorrectly implements interface 'Generator<T, A, any>'.
Type 'SingleShotGen<T, A>' is missing the following properties from type 'Generator<T, A, any>': map, filter, take, drop, and 9 more.

69 export declare class SingleShotGen<T, A> implements Generator<T, A> {
~~~~~~~~~~~~~

Found 1 error in ../../node_modules/.pnpm/[email protected]/node_modules/effect/dist/dts/Utils.d.ts:69

Additional information

if build with TS 5.5, it's successful.

@erlangxk erlangxk added the bug Something isn't working label Oct 27, 2024
@IMax153
Copy link
Member

IMax153 commented Oct 28, 2024

@erlangxk - we had a similar issue in the Effect playground and IIRC upgrading @types/node solved the issue?

But just in case I'm misremembering, I'll ping @gcanti as well :)

@gcanti
Copy link
Contributor

gcanti commented Nov 1, 2024

IIRC upgrading @types/node solved the issue?

I think so too. Here's the commit: Effect-TS/website@4980849#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519

@gcanti gcanti closed this as completed Nov 1, 2024
@zkx5xkt
Copy link

zkx5xkt commented Dec 20, 2024

@IMax153 The error still occurs if ESNext.Iterator is used in the lib option

tsconfig:

{
  "compilerOptions": {
    "target": "es2024",
    "module": "nodenext",
    "strict": true,
    "lib": ["ESNext.Iterator", "DOM"]
  }
}

versions:

  • typescript - 5.7.2
  • @types/node - 22.10.2
  • effect - 3.11.9

@IMax153 IMax153 reopened this Dec 22, 2024
@donflopez
Copy link

donflopez commented Dec 24, 2024

Same thing happens to me, same versions and config as above. Can't get it working with recent versions of TS.

@IMax153
Copy link
Member

IMax153 commented Dec 24, 2024

@zkx5xkt @donflopez @erlangxk - can you folks do me a favor and try this snapshot build in your project and let me know if the issue persists?

pnpm add https://pkg.pr.new/Effect-TS/effect@495e3c4

@zkx5xkt
Copy link

zkx5xkt commented Dec 25, 2024

@zkx5xkt @donflopez @erlangxk - can you folks do me a favor and try this snapshot build in your project and let me know if the issue persists?

pnpm add https://pkg.pr.new/Effect-TS/effect@495e3c4

I tested the snapshot build, and everything is working fine now, the issue is no longer present.
Thank you for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants