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

Expose types again #153

Open
nandorojo opened this issue Mar 16, 2023 · 3 comments
Open

Expose types again #153

nandorojo opened this issue Mar 16, 2023 · 3 comments

Comments

@nandorojo
Copy link
Contributor

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.

@jasonbosco
Copy link
Member

I don't recall exporting these types at the top level...

This should still work:

import { SearchResponse, SearchResponseHit } from "typesense/lib/Typesense/Documents";

@egorkel-altexsoft
Copy link

+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';

@christiankaindl
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants