-
-
Notifications
You must be signed in to change notification settings - Fork 297
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
insertMany type is always never[] #542
Comments
I just ran into this too. Looking at past issues, it looks like you need to use const db = await create({
schema: {
id: "string",
title: "string",
notes: "string",
} as const, // the as const here is important
}) It looks like it's covered in the Typescript documentation page, but I didn't even notice they had a Typescript page, and instead was just relying on the create docs page. |
@rosszurowski that semi-works for me, but I get some weird deviation between the return-type of search and the schema due to the |
@rosszurowski good call. We will fix the docs adding TypeScript specifications on other pages 🙏 |
@micheleriva how can I make orama fuzzier? I am currently testing it out as a replacement for fzf-for-js which fuzzy matches more aggressively |
Did this ever happen? I actually came across the |
Describe the bug
When I try to use insertMultiple I ALWAYS get xyz is not assignable to never[]
To Reproduce
Try using insertMultiple and then running tsc. Can make a repro later. Currently at park with dogs.
Expected behavior
Types should infer correctly.
Environment Info
Affected areas
Data Insertion
Additional context
No response
The text was updated successfully, but these errors were encountered: