algoliasearch-client-javascript
algoliasearch-client-javascript copied to clipboard
fix(types): fix missing type exports
Fixes #1080
This change marks all @algolia/*
packages as bundledPackages for algoliasearch, which means that they are treated as part of this package and not external dependencies.
As a result API Extractor will throw an error if all types from @algolia/*
packages that are accessible publicly through algoliasearch are not properly re-exported.
This PR is separated into 2 commits:
The 1st one updates API Extractor configuration to mark ae-forgotten-export messages as errors and updates the build script to mark all @algolia/*
packages as bundledPackages (for algoliasearch only). This is done dynamically so we do not have to update the configuration if we add/remove some packages.
The 2nd one updates the actual TS files to fix the missing exports.
Hi there, what's the status? Is there something I can help with, maybe?
I use the latest version of the client and I can't access the type for the Settings and TS is bothering me with the queryType
specifically.
PS: it seems that the current workaround for this is to import from subpackages (https://github.com/algolia/algoliasearch-client-javascript/issues/1080#issuecomment-866758783)
import { Settings } from '@algolia/client-search';