Skip to content

Commit

Permalink
Change typoed function name in Params (#1284)
Browse files Browse the repository at this point in the history
  • Loading branch information
Berlioz committed Nov 8, 2022
1 parent a1819e7 commit 39cff12
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
@@ -0,0 +1 @@
- Deprecate typoed function name lessThanorEqualTo (#1284)
10 changes: 9 additions & 1 deletion src/params/types.ts
Expand Up @@ -297,10 +297,18 @@ export abstract class Param<T extends string | number | boolean | string[]> exte
}

/** Returns a parametrized expression of Boolean type, based on comparing the value of this param to a literal or a different expression. */
lessThanorEqualTo(rhs: T | Expression<T>) {
lessThanOrEqualTo(rhs: T | Expression<T>) {
return this.cmp("<=", rhs);
}

/**
* Returns a parametrized expression of Boolean type, based on comparing the value of this param to a literal or a different expression.
* @deprecated A typo. Use lessThanOrEqualTo instead.
*/
lessThanorEqualTo(rhs: T | Expression<T>) {
return this.lessThanOrEqualTo(rhs);
}

toString(): string {
return `params.${this.name}`;
}
Expand Down

0 comments on commit 39cff12

Please sign in to comment.