From 39cff127171e1f76e31beab4c539a66df59275fe Mon Sep 17 00:00:00 2001 From: Victor Fan Date: Mon, 7 Nov 2022 22:33:38 -0800 Subject: [PATCH] Change typoed function name in Params (#1284) --- CHANGELOG.md | 1 + src/params/types.ts | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29bb..1f68266fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1 @@ +- Deprecate typoed function name lessThanorEqualTo (#1284) diff --git a/src/params/types.ts b/src/params/types.ts index fa70d59c7..bd96e62e8 100644 --- a/src/params/types.ts +++ b/src/params/types.ts @@ -297,10 +297,18 @@ export abstract class Param 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) { + lessThanOrEqualTo(rhs: T | Expression) { 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) { + return this.lessThanOrEqualTo(rhs); + } + toString(): string { return `params.${this.name}`; }