Skip to content

Commit 3f9989b

Browse files
fix(javascript): use unknown over any (#4011) (generated) [skip ci]
Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 2c53b45 commit 3f9989b

File tree

14 files changed

+20
-14
lines changed

14 files changed

+20
-14
lines changed

clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/browseResponse.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@ import type { BrowsePagination } from './browsePagination';
55
import type { Cursor } from './cursor';
66
import type { SearchHits } from './searchHits';
77

8-
export type BrowseResponse<T = Record<string, any>> = BaseSearchResponse & BrowsePagination & SearchHits<T> & Cursor;
8+
export type BrowseResponse<T = Record<string, unknown>> = BaseSearchResponse &
9+
BrowsePagination &
10+
SearchHits<T> &
11+
Cursor;

clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/hit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { SnippetResult } from './snippetResult';
77
/**
88
* Search result. A hit is a record from your index, augmented with special attributes for highlighting, snippeting, and ranking.
99
*/
10-
export type Hit<T = Record<string, any>> = T & {
10+
export type Hit<T = Record<string, unknown>> = T & {
1111
/**
1212
* Unique record identifier.
1313
*/

clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchHits.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import type { Hit } from './hit';
44

5-
export type SearchHits<T = Record<string, any>> = Record<string, any> & {
5+
export type SearchHits<T = Record<string, unknown>> = Record<string, any> & {
66
/**
77
* Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting.
88
*/

clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchResponse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ import type { BaseSearchResponse } from './baseSearchResponse';
44
import type { SearchHits } from './searchHits';
55
import type { SearchPagination } from './searchPagination';
66

7-
export type SearchResponse<T = Record<string, any>> = BaseSearchResponse & SearchPagination & SearchHits<T>;
7+
export type SearchResponse<T = Record<string, unknown>> = BaseSearchResponse & SearchPagination & SearchHits<T>;

clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchResponses.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
import type { SearchResult } from './searchResult';
44

5-
export type SearchResponses<T = Record<string, any>> = {
5+
export type SearchResponses<T = Record<string, unknown>> = {
66
results: SearchResult<T>[];
77
};

clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/searchResult.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
import type { SearchForFacetValuesResponse } from './searchForFacetValuesResponse';
44
import type { SearchResponse } from './searchResponse';
55

6-
export type SearchResult<T = Record<string, any>> = SearchResponse<T> | SearchForFacetValuesResponse;
6+
export type SearchResult<T = Record<string, unknown>> = SearchResponse<T> | SearchForFacetValuesResponse;

clients/algoliasearch-client-javascript/packages/client-search/model/browseResponse.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@ import type { BrowsePagination } from './browsePagination';
55
import type { Cursor } from './cursor';
66
import type { SearchHits } from './searchHits';
77

8-
export type BrowseResponse<T = Record<string, any>> = BaseSearchResponse & BrowsePagination & SearchHits<T> & Cursor;
8+
export type BrowseResponse<T = Record<string, unknown>> = BaseSearchResponse &
9+
BrowsePagination &
10+
SearchHits<T> &
11+
Cursor;

clients/algoliasearch-client-javascript/packages/client-search/model/clientMethodProps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ export type ReplaceAllObjectsOptions = {
861861
/**
862862
* The array of `objects` to store in the given Algolia `indexName`.
863863
*/
864-
objects: Array<Record<string, any>>;
864+
objects: Array<Record<string, unknown>>;
865865

866866
/**
867867
* The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.

clients/algoliasearch-client-javascript/packages/client-search/model/getObjectsResponse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
22

3-
export type GetObjectsResponse<T = Record<string, any>> = {
3+
export type GetObjectsResponse<T = Record<string, unknown>> = {
44
/**
55
* Retrieved records.
66
*/

clients/algoliasearch-client-javascript/packages/client-search/model/hit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { SnippetResult } from './snippetResult';
77
/**
88
* Search result. A hit is a record from your index, augmented with special attributes for highlighting, snippeting, and ranking.
99
*/
10-
export type Hit<T = Record<string, any>> = T & {
10+
export type Hit<T = Record<string, unknown>> = T & {
1111
/**
1212
* Unique record identifier.
1313
*/

clients/algoliasearch-client-javascript/packages/client-search/model/searchHits.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import type { Hit } from './hit';
44

5-
export type SearchHits<T = Record<string, any>> = Record<string, any> & {
5+
export type SearchHits<T = Record<string, unknown>> = Record<string, any> & {
66
/**
77
* Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting.
88
*/

clients/algoliasearch-client-javascript/packages/client-search/model/searchResponse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ import type { BaseSearchResponse } from './baseSearchResponse';
44
import type { SearchHits } from './searchHits';
55
import type { SearchPagination } from './searchPagination';
66

7-
export type SearchResponse<T = Record<string, any>> = BaseSearchResponse & SearchPagination & SearchHits<T>;
7+
export type SearchResponse<T = Record<string, unknown>> = BaseSearchResponse & SearchPagination & SearchHits<T>;

clients/algoliasearch-client-javascript/packages/client-search/model/searchResponses.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
import type { SearchResult } from './searchResult';
44

5-
export type SearchResponses<T = Record<string, any>> = {
5+
export type SearchResponses<T = Record<string, unknown>> = {
66
results: SearchResult<T>[];
77
};

clients/algoliasearch-client-javascript/packages/client-search/model/searchResult.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
import type { SearchForFacetValuesResponse } from './searchForFacetValuesResponse';
44
import type { SearchResponse } from './searchResponse';
55

6-
export type SearchResult<T = Record<string, any>> = SearchResponse<T> | SearchForFacetValuesResponse;
6+
export type SearchResult<T = Record<string, unknown>> = SearchResponse<T> | SearchForFacetValuesResponse;

0 commit comments

Comments
 (0)