Hey all :wave: Quick question for the Typesense J...
# community-help
m
Hey all 👋 Quick question for the Typesense JS library, are there docs somewhere that describe how to use TypeScript within it? e.g. if I want to do something like:
Copy code
import Typesense from 'typesense'
Copy code
export const useTypesenseClient = (protocol = 'https', port = 443): SearchClient => {
Where it will say
SearchClient
not found, which is kind of obvious, but I find no information whatsoever on how to import types / which types / etc … ?
r
Some example imports from our app:
Copy code
import { Client } from 'typesense';
import {
  SearchParams,
  SearchOptions,
  SearchResponse
} from 'typesense/lib/Typesense/Documents';
import {
  MultiSearchRequestSchema,
  MultiSearchRequestsSchema,
  MultiSearchResponse
} from 'typesense/lib/Typesense/MultiSearch';
import { CollectionSchema } from 'typesense/lib/Typesense/Collection';
🙏 1
m
Thank you @Ross that is really helpful 🙂