typesense-js icon indicating copy to clipboard operation
typesense-js copied to clipboard

Use ImportResponse[] as type of ImportError.importResults

Open jasongwartz opened this issue 2 years ago • 0 comments

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

jasongwartz avatar Nov 10 '23 15:11 jasongwartz