Skip to content

Commit

Permalink
fix(javascript): use unknown over any (#4011) (generated) [skip ci]
Browse files Browse the repository at this point in the history
Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
  • Loading branch information
algolia-bot and shortcuts committed Oct 21, 2024
1 parent 2c53b45 commit 3f9989b
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ import type { BrowsePagination } from './browsePagination';
import type { Cursor } from './cursor';
import type { SearchHits } from './searchHits';

export type BrowseResponse<T = Record<string, any>> = BaseSearchResponse & BrowsePagination & SearchHits<T> & Cursor;
export type BrowseResponse<T = Record<string, unknown>> = BaseSearchResponse &
BrowsePagination &
SearchHits<T> &
Cursor;
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { SnippetResult } from './snippetResult';
/**
* Search result. A hit is a record from your index, augmented with special attributes for highlighting, snippeting, and ranking.
*/
export type Hit<T = Record<string, any>> = T & {
export type Hit<T = Record<string, unknown>> = T & {
/**
* Unique record identifier.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

export type SearchHits<T = Record<string, any>> = Record<string, any> & {
export type SearchHits<T = Record<string, unknown>> = Record<string, any> & {
/**
* Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ import type { BaseSearchResponse } from './baseSearchResponse';
import type { SearchHits } from './searchHits';
import type { SearchPagination } from './searchPagination';

export type SearchResponse<T = Record<string, any>> = BaseSearchResponse & SearchPagination & SearchHits<T>;
export type SearchResponse<T = Record<string, unknown>> = BaseSearchResponse & SearchPagination & SearchHits<T>;
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

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

export type SearchResponses<T = Record<string, any>> = {
export type SearchResponses<T = Record<string, unknown>> = {
results: SearchResult<T>[];
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
import type { SearchForFacetValuesResponse } from './searchForFacetValuesResponse';
import type { SearchResponse } from './searchResponse';

export type SearchResult<T = Record<string, any>> = SearchResponse<T> | SearchForFacetValuesResponse;
export type SearchResult<T = Record<string, unknown>> = SearchResponse<T> | SearchForFacetValuesResponse;
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ import type { BrowsePagination } from './browsePagination';
import type { Cursor } from './cursor';
import type { SearchHits } from './searchHits';

export type BrowseResponse<T = Record<string, any>> = BaseSearchResponse & BrowsePagination & SearchHits<T> & Cursor;
export type BrowseResponse<T = Record<string, unknown>> = BaseSearchResponse &
BrowsePagination &
SearchHits<T> &
Cursor;
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ export type ReplaceAllObjectsOptions = {
/**
* The array of `objects` to store in the given Algolia `indexName`.
*/
objects: Array<Record<string, any>>;
objects: Array<Record<string, unknown>>;

/**
* The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// 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.

export type GetObjectsResponse<T = Record<string, any>> = {
export type GetObjectsResponse<T = Record<string, unknown>> = {
/**
* Retrieved records.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { SnippetResult } from './snippetResult';
/**
* Search result. A hit is a record from your index, augmented with special attributes for highlighting, snippeting, and ranking.
*/
export type Hit<T = Record<string, any>> = T & {
export type Hit<T = Record<string, unknown>> = T & {
/**
* Unique record identifier.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

export type SearchHits<T = Record<string, any>> = Record<string, any> & {
export type SearchHits<T = Record<string, unknown>> = Record<string, any> & {
/**
* Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ import type { BaseSearchResponse } from './baseSearchResponse';
import type { SearchHits } from './searchHits';
import type { SearchPagination } from './searchPagination';

export type SearchResponse<T = Record<string, any>> = BaseSearchResponse & SearchPagination & SearchHits<T>;
export type SearchResponse<T = Record<string, unknown>> = BaseSearchResponse & SearchPagination & SearchHits<T>;
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

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

export type SearchResponses<T = Record<string, any>> = {
export type SearchResponses<T = Record<string, unknown>> = {
results: SearchResult<T>[];
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
import type { SearchForFacetValuesResponse } from './searchForFacetValuesResponse';
import type { SearchResponse } from './searchResponse';

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

0 comments on commit 3f9989b

Please sign in to comment.