-
Notifications
You must be signed in to change notification settings - Fork 23
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
Misconfiguration for typescript projects using module node16/nodenext #43
Comments
Still not fixed. Alternatively, go back to "moduleResolution": "node" |
Can you just make a named export for At the moment I'm doing something like this to ignore typescript errors: (weaviate as unknown as typeof weaviate.default).client({ ... }) |
@MellKam thanks, that is working! |
I'm happy to announce that this is fixed in the next major release! It's currently in an open community beta and installable using |
Hi.
I'm currently working on ESM repo with tsconfig moduleResolution set to node16, and this library has misconfigured type definition that confusing typescript when we try to import default export from the module.
In current configuration, the library's seems to have so-called double-default problem described in typescript repo.
Reproduce
In a project with
package.json
"type": "module"
tsconfig.json
"moduleResolution": "node16"
While trying to import default export from
weaviate-ts-client
, typescript's expectation and actual runtime value mismatchesYou can see arethetypeswrong also indicates the repo is misconfigured in the exact way as I described above.
It seems like node16's module resolution strategy and typescript's following implementations making a lot of trouble in ecosystem and making quite a bit of confusions all over the place, as you can see from
microsoft/TypeScript#50058
microsoft/TypeScript#49160
vitejs/vite-plugin-react#104
I'm afraid that I can't really tell what's the workaround for this as it's really confusing for me that what's the problem at the first place..
I might be wrong here, so feel free to point me out.
It'd be much appreciated if someone can analyze the details regarding to the problem.
The text was updated successfully, but these errors were encountered: