Skip to content

Commit

Permalink
fix: searchResultWithHighlight incorrectly typed (#497)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rishi Raj Jain authored Sep 28, 2023
1 parent 76c9026 commit 0ad2ce4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/plugin-match-highlight/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export type OramaWithHighlight<T extends AnyOrama> = T & {
}

export type SearchResultWithHighlight<ResultDocument> = Results<ResultDocument> & {
hits: (Result<ResultDocument> & { positions: Position[] })[]
hits: (Result<ResultDocument> & { positions: Record<string, Record<string, Position[]>> })[]
}

export type RawDataWithPositions = RawData & {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-nextra/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ function OramaSearchPlugin({ router, ...props }) {
<HighlightedDocument
hit={
{ document, positions } as Result<TypedDocument<NextraOrama>> & {
positions: Position[]
positions: Record<string, Record<string, Position[]>>
}
}
/>
Expand Down

1 comment on commit 0ad2ce4

@vercel
Copy link

@vercel vercel bot commented on 0ad2ce4 Sep 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.