Skip to content

Commit cd1ae16

Browse files
authored
Merge pull request #586 from neo4j/deprecate-list-comprehension-params
Deprecate second parameter of ListComprehension
2 parents 3563bf1 + 3dac2b8 commit cd1ae16

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)