From a6d402200d21b82bd48e6e50169d06f312cb3815 Mon Sep 17 00:00:00 2001 From: MT Lewis Date: Tue, 15 Mar 2022 10:01:28 +0000 Subject: [PATCH] search-common: restrict allowed type parameters for Result and ResultSet Signed-off-by: MT Lewis --- plugins/search-common/api-report.md | 4 ++-- plugins/search-common/src/types.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/search-common/api-report.md b/plugins/search-common/api-report.md index 6befd6d1ca..bd5a56c5cc 100644 --- a/plugins/search-common/api-report.md +++ b/plugins/search-common/api-report.md @@ -51,7 +51,7 @@ export type QueryRequestOptions = { export type QueryTranslator = (query: SearchQuery) => unknown; // @beta (undocumented) -export interface Result { +export interface Result { // (undocumented) document: TDocument; // (undocumented) @@ -59,7 +59,7 @@ export interface Result { } // @beta (undocumented) -export interface ResultSet { +export interface ResultSet { // (undocumented) nextPageCursor?: string; // (undocumented) diff --git a/plugins/search-common/src/types.ts b/plugins/search-common/src/types.ts index cf385cfa64..21aed101f6 100644 --- a/plugins/search-common/src/types.ts +++ b/plugins/search-common/src/types.ts @@ -31,7 +31,7 @@ export interface SearchQuery { /** * @beta */ -export interface Result { +export interface Result { type: string; document: TDocument; } @@ -39,7 +39,7 @@ export interface Result { /** * @beta */ -export interface ResultSet { +export interface ResultSet { results: Result[]; nextPageCursor?: string; previousPageCursor?: string;