`MatchingStrategies` type issues
flevi29 opened this issue · 1 comments
flevi29 commented
I know this might sound like nitpicking, but I am trying to contribute, and this does cause a little issue.
I see that the instantsearch plugin even went so far as to re-implement the native enum into a typescript enum.
meilisearch-js/src/types/types.ts
Lines 57 to 62 in b9f3c6a
Should be re-written to:
export const MatchingStrategies = {
ALL: 'all',
LAST: 'last',
} as const
// OR
export const MatchingStrategies = Object.freeze({
ALL: 'all',
LAST: 'last',
})
export type MatchingStrategies = typeof MatchingStrategies[keyof typeof MatchingStrategies]
Otherwise MatchingStrategies
is just string
.
curquiza commented
Good idea! Feel free to implement it, we are open to review your PR 😄