Skip to content

Commit 3dac2b8

Browse files
committed
Deprecate second parameter of ListComprehension
1 parent 3563bf1 commit 3dac2b8

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.changeset/giant-items-exist.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@neo4j/cypher-builder": patch
3+
---
4+
5+
Deprecates second parameter of `new ListComprehension` in favor of `.in`

src/expressions/list/ListComprehension.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ export class ListComprehension extends CypherASTNode {
3838
private listExpr: Expr | undefined;
3939
private mapExpr: Expr | undefined; // Expression for list mapping
4040

41+
constructor(variable: Variable);
42+
/** @deprecated Use `new ListComprehension(var1).in(expr)` instead */
43+
constructor(variable: Variable, listExpr: Expr);
4144
constructor(variable: Variable, listExpr?: Expr) {
4245
super();
4346
this.variable = variable;

0 commit comments

Comments
 (0)