From 4591d0eb02382b4380cb0a0a124461315d5b1bc2 Mon Sep 17 00:00:00 2001 From: Haroen Viaene Date: Wed, 25 Nov 2020 22:44:07 +0100 Subject: [PATCH] fix(ts): don't require every attribute to be highlighted (#1234) --- packages/client-search/src/types/Hit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client-search/src/types/Hit.ts b/packages/client-search/src/types/Hit.ts index 7e4a36435..99c6c992b 100644 --- a/packages/client-search/src/types/Hit.ts +++ b/packages/client-search/src/types/Hit.ts @@ -8,7 +8,7 @@ type HighlightMatch = { export type HighlightResult = THit extends string | number ? HighlightMatch : { - [KAttribute in keyof THit]: HighlightResult; + [KAttribute in keyof THit]?: HighlightResult; }; type SnippetMatch = {