typesense-js
typesense-js copied to clipboard
Use ImportResponse[] as type of ImportError.importResults
Change Summary
The docs indicate that the error thrown by import() (as in: client.collections(...).documents().import(...)) contains a key importResults. In my usage, I found that the runtime type of the value of importResults is an array, which seems to contain either ImportResponseSuccess or ImportResponseFail. At the moment I'm force-casting to override the type given by the library, but if my experimentation is correct, it'd be good to include the correct type here.
PR Checklist
- [x] I have read and signed the Contributor License Agreement.