Skip to content

Commit 7670995

Browse files
committed
update js doc
1 parent 0458094 commit 7670995

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

docs-devsite/firestore_lite_pipelines.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1886,9 +1886,9 @@ A new Expression representing the switch operation.
18861886
// Return "Active" if field "status" is 1, "Pending" if field "status" is 2,
18871887
// and default to "Unknown" if none of the conditions are true.
18881888
switchOn(
1889-
equal(field("status"), 1), "Active",
1890-
equal(field("status"), 2), "Pending",
1891-
"Unknown"
1889+
equal(field("status"), 1), constant("Active"),
1890+
equal(field("status"), 2), constant("Pending"),
1891+
constant("Unknown")
18921892
)
18931893

18941894
```

docs-devsite/firestore_pipelines.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1892,9 +1892,9 @@ A new Expression representing the switch operation.
18921892
// Return "Active" if field "status" is 1, "Pending" if field "status" is 2,
18931893
// and default to "Unknown" if none of the conditions are true.
18941894
switchOn(
1895-
equal(field("status"), 1), "Active",
1896-
equal(field("status"), 2), "Pending",
1897-
"Unknown"
1895+
equal(field("status"), 1), constant("Active"),
1896+
equal(field("status"), 2), constant("Pending"),
1897+
constant("Unknown")
18981898
)
18991899

19001900
```

packages/firestore/src/lite-api/expressions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10571,9 +10571,9 @@ export function ifAbsent(
1057110571
* // Return "Active" if field "status" is 1, "Pending" if field "status" is 2,
1057210572
* // and default to "Unknown" if none of the conditions are true.
1057310573
* switchOn(
10574-
* equal(field("status"), 1), "Active",
10575-
* equal(field("status"), 2), "Pending",
10576-
* "Unknown"
10574+
* equal(field("status"), 1), constant("Active"),
10575+
* equal(field("status"), 2), constant("Pending"),
10576+
* constant("Unknown")
1057710577
* )
1057810578
* ```
1057910579
*

0 commit comments

Comments
 (0)