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

Type information (module augmentation) doesn't work properly with the library effect #967

Closed
evelant opened this issue Oct 9, 2023 · 5 comments
Assignees

Comments

@evelant
Copy link

evelant commented Oct 9, 2023

Describe the bug
When importing effect from https://esm.sh/[email protected]?target=denonext the extension fails to provide correct types to the editor. effect uses standard module augmentation for many of its types. effect works fine with normal typescript, and Deno can run it without issue, it is only the vscode_deno extension that fails to load the types correctly.

Argument of type 'Tag<Foo, Foo>' is not assignable to parameter of type 'Effect<unknown, unknown, unknown>'.
  Type 'Tag<Foo, Foo>' is missing the following properties from type 'Effect<unknown, unknown, unknown>': [EffectTypeId], [symbol], [symbol]deno-ts(2345)

To Reproduce

Reproduction here: https://github.com/evelant/deno_effect_test

Expected behavior

vscode_deno should load types correctly

Screenshots

N/A

Versions

vscode: 1.84.0-insider deno: 1.37.1 extension: 3.25.1

@evelant
Copy link
Author

evelant commented Oct 31, 2023

@nayeemrmn or @bartlomieju any ideas about how to move this one forward? All of my code uses effect so I get no type checking anywhere I have to use Deno.

@nayeemrmn
Copy link
Collaborator

@evelant Have you tried using npm:effect?

@evelant
Copy link
Author

evelant commented Oct 31, 2023

Unfortunately I can't use npm specifiers yet. I'm using Supabase and npm specifiers aren't supported by their Deno edge runtime yet.

@evelant
Copy link
Author

evelant commented Dec 1, 2023

@nayeemrmn any update on this? I still can't import effect from esm.sh and have types work in vscode_deno. It runs without issue but it's nearly impossible to develop effect code without typescript support.

@nayeemrmn
Copy link
Collaborator

@evelant I also get these errors from running deno check main.ts. Have you tried that? It's probably a problem with esm.sh.

@nayeemrmn nayeemrmn added upstream This feature requires upstream changes and removed bug Something isn't working needs investigation labels Dec 3, 2023
@nayeemrmn nayeemrmn added working as designed and removed upstream This feature requires upstream changes labels Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants