mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-30 10:35:22 +08:00
chore: stricter settings type
This commit is contained in:
@@ -79,7 +79,7 @@ let _algoliaIndexSettings: IndexSettings = {
|
||||
ignorePlurals: false,
|
||||
disableTypoToleranceOnAttributes: '',
|
||||
separatorsToIndex: '',
|
||||
queryType: '',
|
||||
queryType: 'prefixAll',
|
||||
removeWordsIfNoResults: '',
|
||||
advancedSyntax: false,
|
||||
optionalWords: [''],
|
||||
@@ -87,7 +87,7 @@ let _algoliaIndexSettings: IndexSettings = {
|
||||
disablePrefixOnAttributes: [''],
|
||||
disableExactOnAttributes: [''],
|
||||
exactOnSingleWordQuery: '',
|
||||
alternativesAsExact: false,
|
||||
alternativesAsExact: ['ignorePlurals'],
|
||||
attributeForDistinct: '',
|
||||
distinct: false,
|
||||
numericAttributesToIndex: [''],
|
||||
|
||||
11
types/algoliasearch/index.d.ts
vendored
11
types/algoliasearch/index.d.ts
vendored
@@ -1619,7 +1619,7 @@ declare namespace algoliasearch {
|
||||
* 'strict' Hits matching with 2 typos are not retrieved if there are some matching without typos.
|
||||
* https://github.com/algolia/algoliasearch-client-js#typotolerance
|
||||
*/
|
||||
typoTolerance?: any;
|
||||
typoTolerance?: boolean | 'min' | 'strict';
|
||||
/**
|
||||
* If set to false, disables typo tolerance on numeric tokens (numbers).
|
||||
* default: true
|
||||
@@ -1652,7 +1652,7 @@ declare namespace algoliasearch {
|
||||
* 'prefixNone' No query word is interpreted as a prefix. This option is not recommended.
|
||||
* https://github.com/algolia/algoliasearch-client-js#querytype
|
||||
*/
|
||||
queryType?: any;
|
||||
queryType?: 'prefixAll' | 'prefixLast' | 'prefixNone';
|
||||
/**
|
||||
* This option is used to select a strategy in order to avoid having an empty result page
|
||||
* default: 'none'
|
||||
@@ -1718,7 +1718,10 @@ declare namespace algoliasearch {
|
||||
* 'multiWordsSynonym': multiple-words synonym
|
||||
* https://github.com/algolia/algoliasearch-client-js#alternativesasexact
|
||||
*/
|
||||
alternativesAsExact?: any;
|
||||
alternativesAsExact?: (
|
||||
| "ignorePlurals"
|
||||
| "singleWordSynonym"
|
||||
| "multiWordsSynonym")[];
|
||||
/**
|
||||
* The name of the attribute used for the Distinct feature
|
||||
* default: null
|
||||
@@ -1729,7 +1732,7 @@ declare namespace algoliasearch {
|
||||
* If set to 1, enables the distinct feature, disabled by default, if the attributeForDistinct index setting is set.
|
||||
* https://github.com/algolia/algoliasearch-client-js#distinct
|
||||
*/
|
||||
distinct?: any;
|
||||
distinct?: boolean | number;
|
||||
/**
|
||||
* All numerical attributes are automatically indexed as numerical filters
|
||||
* default ''
|
||||
|
||||
Reference in New Issue
Block a user