@@ -793,8 +793,8 @@ export function createSearchClient({
793
793
* @param addOrUpdateObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
794
794
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
795
795
*/
796
- addOrUpdateObject (
797
- { indexName, objectID, body } : AddOrUpdateObjectProps ,
796
+ addOrUpdateObject < T extends object > (
797
+ { indexName, objectID, body } : AddOrUpdateObjectProps < T > ,
798
798
requestOptions ?: RequestOptions ,
799
799
) : Promise < UpdatedAtWithObjectIdResponse > {
800
800
if ( ! indexName ) {
@@ -2330,7 +2330,10 @@ export function createSearchClient({
2330
2330
* @param saveObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
2331
2331
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2332
2332
*/
2333
- saveObject ( { indexName, body } : SaveObjectProps , requestOptions ?: RequestOptions ) : Promise < SaveObjectResponse > {
2333
+ saveObject < T extends object > (
2334
+ { indexName, body } : SaveObjectProps < T > ,
2335
+ requestOptions ?: RequestOptions ,
2336
+ ) : Promise < SaveObjectResponse > {
2334
2337
if ( ! indexName ) {
2335
2338
throw new Error ( 'Parameter `indexName` is required when calling `saveObject`.' ) ;
2336
2339
}
0 commit comments