@@ -35,8 +35,9 @@ const cityConverter = {
3535describe ( "firestore" , ( ) => {
3636 const { Firestore } = require ( "firebase/firestore" ) ;
3737
38- let app ;
39- let db ;
38+ /** @type {Firestore } */
39+ let db ;
40+ let app ;
4041
4142 before ( ( ) => {
4243 const { initializeApp } = require ( "firebase/app" ) ;
@@ -1346,8 +1347,8 @@ describe("firestore-pipelines", () => {
13461347 . where ( field ( "population" ) . greaterThan ( 100000 ) )
13471348 // Step 3: Sort the remaining documents
13481349 . sort ( [ field ( "name" ) . ascending ( ) ] )
1349- // Step 4: Return the top 10. Note applying the limit earlier in the pipeline would have
1350- // unintentional results.
1350+ // Step 4: Return the top 10. Note applying the limit earlier in the
1351+ // pipeline would have unintentional results.
13511352 . limit ( 10 ) ;
13521353 // [END pipeline_concepts]
13531354 console . log ( pipeline ) ;
@@ -1726,7 +1727,7 @@ describe("firestore-pipelines", () => {
17261727 // { identifier: 1, neighbors: [ "Alice", "Cathy" ], unnestedNeighbors: "Alice", index: 0 }
17271728 // { identifier: 1, neighbors: [ "Alice", "Cathy" ], unnestedNeighbors: "Cathy", index: 1 }
17281729 // { identifier: 3, neighbors: "Bob", index: null}
1729- // [END unneest_edge_cases ]
1730+ // [END unnest_edge_cases ]
17301731 console . log ( results ) ;
17311732 }
17321733
@@ -2083,7 +2084,7 @@ describe("firestore-pipelines", () => {
20832084 }
20842085
20852086 async function lessThanOrEqualToFunction ( ) {
2086- // START less_or_equal]
2087+ // [ START less_or_equal]
20872088 const result = await db . pipeline ( )
20882089 . collection ( "books" )
20892090 . select ( [ field ( "rating" ) . lessThanOrEqual ( 2 ) . as ( "hasBadRating" ) ] )
0 commit comments