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

[Bug]: Type of Collection not exported in TypeScript #3076

Open
andriadze opened this issue Nov 6, 2024 · 5 comments
Open

[Bug]: Type of Collection not exported in TypeScript #3076

andriadze opened this issue Nov 6, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@andriadze
Copy link

What happened?

In previous versions, I could import "Collection" and use its type. In version 1.9.2 I can't import Collection anymore.

I see that type: CollectionType is exported, but that type does not contain methods such as: add, query.

This is a scenario where I need a type for collection:

let someCol: Collection;

if(foo){
  someCol = chromaClient.getOrCreateCollection("X")
}else{
  someCol = chromaClient.getOrCreateCollection("Y")
}

Versions

JS chromadb: 1.9.2

Relevant log output

No response

@andriadze andriadze added the bug Something isn't working label Nov 6, 2024
andriadze added a commit to andriadze/chroma that referenced this issue Nov 6, 2024
@andriadze
Copy link
Author

Opened a PR for this issue.

@preston
Copy link

preston commented Nov 11, 2024

Anyone know if this'll be fixed soon?

andriadze added a commit to andriadze/chroma that referenced this issue Nov 12, 2024
@emmettprexus
Copy link

I ran into this issue as well 😑. It would be great to have this resolved. For now, I'm patching the compiled file, which doesn't feel ideal 😅.

@promentol
Copy link

For anybody who is working with Typescript this is major issue, please accept the PR ))

@preston
Copy link

preston commented Dec 19, 2024

Could someone please add this? It's a major probably and should be a simple 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

No branches or pull requests

4 participants