typesense-js
typesense-js copied to clipboard
Expose types again
I previously imported these types:
import { SearchResponse, SearchResponseHit } from 'typesense'
It looks like they're no longer exported by the library. Would be nice to have this to build custom hooks with.
I don't recall exporting these types at the top level...
This should still work:
import { SearchResponse, SearchResponseHit } from "typesense/lib/Typesense/Documents";
+1 for top level imports It looks terrible
import { SearchClient } from 'typesense';
import { ConfigurationOptions } from 'typesense/lib/Typesense/Configuration';
import { SearchParams } from 'typesense/lib/Typesense/Documents';
import { SearchOnlyCollection } from 'typesense/lib/Typesense/SearchOnlyCollection';
Just ran into this issue, would be good to at least document how Typesense is supposed to be used with TypeScript.
The import path is not at all obvious and there is no auto-import in VS Code. If I wouldn't have found this open issue on GH, I'd be stuck with no types from Typesense.