Skip to content

Commit

Permalink
fix: backport FindOperator return types (#6717)
Browse files Browse the repository at this point in the history
the `next` branch added return types to `FindOperator`s and
this backports that change
  • Loading branch information
imnotjames committed Sep 15, 2020
1 parent b50576e commit 2b37808
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/find-options/operator/Any.ts
Expand Up @@ -4,6 +4,6 @@ import {FindOperator} from "../FindOperator";
* Find Options Operator.
* Example: { someField: Any([...]) }
*/
export function Any<T>(value: T[]|FindOperator<T>) {
export function Any<T>(value: T[]|FindOperator<T>): FindOperator<T> {
return new FindOperator("any", value as any);
}
}
4 changes: 2 additions & 2 deletions src/find-options/operator/Between.ts
Expand Up @@ -4,6 +4,6 @@ import {FindOperator} from "../FindOperator";
* Find Options Operator.
* Example: { someField: Between(x, y) }
*/
export function Between<T>(from: T|FindOperator<T>, to: T|FindOperator<T>) {
export function Between<T>(from: T|FindOperator<T>, to: T|FindOperator<T>): FindOperator<T> {
return new FindOperator("between", [from, to] as any, true, true);
}
}
4 changes: 2 additions & 2 deletions src/find-options/operator/In.ts
Expand Up @@ -4,6 +4,6 @@ import {FindOperator} from "../FindOperator";
* Find Options Operator.
* Example: { someField: In([...]) }
*/
export function In<T>(value: T[]|FindOperator<T>) {
export function In<T>(value: T[]|FindOperator<T>): FindOperator<T> {
return new FindOperator("in", value as any, true, true);
}
}
4 changes: 2 additions & 2 deletions src/find-options/operator/Raw.ts
Expand Up @@ -4,6 +4,6 @@ import {FindOperator} from "../FindOperator";
* Find Options Operator.
* Example: { someField: Raw([...]) }
*/
export function Raw<T>(value: string|((columnAlias: string) => string)) {
export function Raw<T>(value: string|((columnAlias: string) => string)): FindOperator<any> {
return new FindOperator("raw", value as any, false);
}
}

0 comments on commit 2b37808

Please sign in to comment.