Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/client-search/src/searchClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1625,10 +1625,10 @@ export function createSearchClient({
* @param getObject.attributesToRetrieve - Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won\'t be retrieved unless the request is authenticated with the admin API key.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
*/
getObject(
getObject<T = Record<string, any>>(
{ indexName, objectID, attributesToRetrieve }: GetObjectProps,
requestOptions?: RequestOptions,
): Promise<Record<string, unknown>> {
): Promise<T> {
if (!indexName) {
throw new Error('Parameter `indexName` is required when calling `getObject`.');
}
Expand Down