Skip to content

Review from Tom #8983

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: feat/pipelines
Choose a base branch
from
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 19 additions & 18 deletions packages/firestore/src/lite-api/expressions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,8 @@ export abstract class Expr implements ProtoValueSerializable, UserData {
}

/**
* Creates an expression that checks if a field exists in the document.
* Creates an expression that checks if this expression evaluates to a name of
* the field that exists.
*
* ```typescript
* // Check if the document has a field named "phoneNumber"
Expand Down Expand Up @@ -3139,7 +3140,7 @@ export function isAbsent(value: Expr | string): BooleanExpr {
/**
* @beta
*
* Creates an expression that checks if an expression evaluates to 'NaN' (Not a Number).
* Creates an expression that checks if tbe result of an expression is null.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The example needs to be fixed

*
* ```typescript
* // Check if the result of a calculation is NaN
Expand All @@ -3154,7 +3155,7 @@ export function isNull(value: Expr): BooleanExpr;
/**
* @beta
*
* Creates an expression that checks if a field's value evaluates to 'NaN' (Not a Number).
* Creates an expression that checks if tbe value of a field is null.
*
* ```typescript
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The example needs to be fixed

* // Check if the result of a calculation is NaN
Expand Down Expand Up @@ -4664,7 +4665,7 @@ export function eqAny(
*
* @param fieldName The field to compare.
* @param arrayExpression An expression that evaluates to an array, whose elements to check for equality to the input field.
* @return A new {@code Expr} representing the 'IN' comparison.
* @return A new {@code BooleanExpr} representing the 'IN' comparison.
*/
export function eqAny(fieldName: string, arrayExpression: Expr): BooleanExpr;
export function eqAny(
Expand All @@ -4678,7 +4679,7 @@ export function eqAny(
/**
* @beta
*
* Creates an expression that checks if an expression is not equal to any of the provided values
* Creates an expression that checks if an expression is not equal to all the provided values
* or expressions.
*
* ```typescript
Expand All @@ -4688,7 +4689,7 @@ export function eqAny(
*
* @param element The expression to compare.
* @param values The values to check against.
* @return A new {@code Expr} representing the 'NOT IN' comparison.
* @return A new {@code BooleanExpr} representing the 'NOT IN' comparison.
*/
export function notEqAny(
element: Expr,
Expand All @@ -4698,7 +4699,7 @@ export function notEqAny(
/**
* @beta
*
* Creates an expression that checks if a field's value is not equal to any of the provided values
* Creates an expression that checks if a field's value is not equal to all the provided values
* or expressions.
*
* ```typescript
Expand All @@ -4708,7 +4709,7 @@ export function notEqAny(
*
* @param fieldName The field name to compare.
* @param values The values to check against.
* @return A new {@code Expr} representing the 'NOT IN' comparison.
* @return A new {@code BooleanExpr} representing the 'NOT IN' comparison.
*/
export function notEqAny(
fieldName: string,
Expand All @@ -4718,7 +4719,7 @@ export function notEqAny(
/**
* @beta
*
* Creates an expression that checks if an expression is not equal to any of the provided values
* Creates an expression that checks if an expression is not equal to all the provided values
* or expressions.
*
* ```typescript
Expand All @@ -4728,14 +4729,14 @@ export function notEqAny(
*
* @param element The expression to compare.
* @param arrayExpression The values to check against.
* @return A new {@code Expr} representing the 'NOT IN' comparison.
* @return A new {@code BooleanExpr} representing the 'NOT IN' comparison.
*/
export function notEqAny(element: Expr, arrayExpression: Expr): BooleanExpr;

/**
* @beta
*
* Creates an expression that checks if a field's value is not equal to any of the values in the evaluated expression.
* Creates an expression that checks if a field's value is not equal to all the values in the evaluated expression.
*
* ```typescript
* // Check if the 'status' field is not equal to any value in the field 'rejectedStatuses'
Expand All @@ -4744,7 +4745,7 @@ export function notEqAny(element: Expr, arrayExpression: Expr): BooleanExpr;
*
* @param fieldName The field name to compare.
* @param arrayExpression The values to check against.
* @return A new {@code Expr} representing the 'NOT IN' comparison.
* @return A new {@code BooleanExpr} representing the 'NOT IN' comparison.
*/
export function notEqAny(fieldName: string, arrayExpression: Expr): BooleanExpr;

Expand Down Expand Up @@ -4773,7 +4774,7 @@ export function notEqAny(
* @param first The first condition.
* @param second The second condition.
* @param additionalConditions Additional conditions to 'XOR' together.
* @return A new {@code Expr} representing the logical 'XOR' operation.
* @return A new {@code BooleanExpr} representing the logical 'XOR' operation.
*/
export function xor(
first: BooleanExpr,
Expand Down Expand Up @@ -4951,7 +4952,7 @@ export function logicalMinimum(
* ```
*
* @param value An expression evaluates to the name of the field to check.
* @return A new {@code Expr} representing the 'exists' check.
* @return A new {@code BooleanExpr} representing the 'exists' check.
*/
export function exists(value: Expr): BooleanExpr;

Expand All @@ -4966,7 +4967,7 @@ export function exists(value: Expr): BooleanExpr;
* ```
*
* @param fieldName The field name to check.
* @return A new {@code Expr} representing the 'exists' check.
* @return A new {@code BooleanExpr} representing the 'exists' check.
*/
export function exists(fieldName: string): BooleanExpr;
export function exists(valueOrField: Expr | string): BooleanExpr {
Expand All @@ -4984,7 +4985,7 @@ export function exists(valueOrField: Expr | string): BooleanExpr {
* ```
*
* @param value The expression to check.
* @return A new {@code Expr} representing the 'isNaN' check.
* @return A new {@code BooleanExpr} representing the 'isNaN' check.
*/
export function isNan(value: Expr): BooleanExpr;

Expand All @@ -4999,7 +5000,7 @@ export function isNan(value: Expr): BooleanExpr;
* ```
*
* @param fieldName The name of the field to check.
* @return A new {@code Expr} representing the 'isNaN' check.
* @return A new {@code BooleanExpr} representing the 'isNaN' check.
*/
export function isNan(fieldName: string): BooleanExpr;
export function isNan(value: Expr | string): BooleanExpr {
Expand All @@ -5017,7 +5018,7 @@ export function isNan(value: Expr | string): BooleanExpr {
* ```
*
* @param stringExpression An expression evaluating to a string value, which will be reversed.
* @return A new {@code Expr} representing the reversed string.
* @return A new {@code BooleanExpr} representing the reversed string.
*/
export function reverse(stringExpression: Expr): FunctionExpr;

Expand Down
Loading