Skip to content

Commit

Permalink
add type annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaong committed Sep 18, 2020
1 parent ace6f25 commit 09a933f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MiniSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ type CombinatorFunction = (a: RawResult | null, b: RawResult) => RawResult

const combinators: { [kind: string]: CombinatorFunction } = {
[OR]: (a: RawResult | null, b: RawResult) => {
return Object.entries(b).reduce((combined, [documentId, { score, match, terms }]) => {
return Object.entries(b).reduce((combined: RawResult, [documentId, { score, match, terms }]) => {
if (combined[documentId] == null) {
combined[documentId] = { score, match, terms }
} else {
Expand Down

0 comments on commit 09a933f

Please sign in to comment.