Skip to content

Commit

Permalink
update SelectorField<T> to remove special typing for $contains queries (
Browse files Browse the repository at this point in the history
  • Loading branch information
jemiluv8 authored May 2, 2023
1 parent d5d0794 commit 15b5b82
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -775,13 +775,7 @@ export type SelectorOperator =
export type LogicalOperator = "$or" | "$and";

export type SelectorFilter<T> = {
[K in PathsForFilter<T>]?:
| PathType<T, K>
| {
[P in SelectorOperator]?: P extends "$contains"
? PathType<T, K> | PathType<T, K>[]
: PathType<T, K>;
};
[K in PathsForFilter<T>]?: PathType<T, K> | { [P in SelectorOperator]?: PathType<T, K> };
};

export type LogicalFilter<T> = {
Expand Down

0 comments on commit 15b5b82

Please sign in to comment.