@@ -793,8 +793,8 @@ export function createSearchClient({
793793 * @param addOrUpdateObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
794794 * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
795795 */
796- addOrUpdateObject (
797- { indexName, objectID, body } : AddOrUpdateObjectProps ,
796+ addOrUpdateObject < T extends object > (
797+ { indexName, objectID, body } : AddOrUpdateObjectProps < T > ,
798798 requestOptions ?: RequestOptions ,
799799 ) : Promise < UpdatedAtWithObjectIdResponse > {
800800 if ( ! indexName ) {
@@ -2330,7 +2330,10 @@ export function createSearchClient({
23302330 * @param saveObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
23312331 * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
23322332 */
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 > {
23342337 if ( ! indexName ) {
23352338 throw new Error ( 'Parameter `indexName` is required when calling `saveObject`.' ) ;
23362339 }
0 commit comments