@@ -39,7 +39,7 @@ const groupRef = getFirelord<Child>(db, 'parent', 'child').collectionGroup()
39
39
query (
40
40
colRef ,
41
41
// @ts -expect-error
42
- where ( documentId ( ) , '==' , 'xyz/a' as const )
42
+ where ( documentId ( ) , '==' , 'xyz/a' )
43
43
) // bad: invalid characters
44
44
//
45
45
//
51
51
query (
52
52
groupRef ,
53
53
// @ts -expect-error
54
- where ( documentId ( ) , '==' , 'wrong/path/same/count' as const )
54
+ where ( documentId ( ) , '==' , 'wrong/path/same/count' )
55
55
) // bad: slash count matched but path is wrong
56
56
//
57
57
//
64
64
query (
65
65
groupRef ,
66
66
// @ts -expect-error
67
- where ( documentId ( ) , '==' , 'parent/abc/child' as const )
67
+ where ( documentId ( ) , '==' , 'parent/abc/child' )
68
68
) // bad: count mismatched
69
- query ( groupRef , where ( documentId ( ) , '==' , 'parent/abc/child/xyz' as const ) ) // good: count matched and correct type
69
+ query ( groupRef , where ( documentId ( ) , '==' , 'parent/abc/child/xyz' ) ) // good: count matched and correct type
70
70
//
71
71
//
72
72
//
@@ -77,33 +77,7 @@ query(groupRef, where(documentId(), '==', 'parent/abc/child/xyz' as const)) // g
77
77
query (
78
78
colRef ,
79
79
// @ts -expect-error
80
- where ( documentId ( ) , '>' , 'xyz' as const ) ,
80
+ where ( documentId ( ) , '>' , 'xyz' ) ,
81
81
orderBy ( 'z' )
82
82
) // bad: first orderBy field is incorrect
83
- query ( colRef , where ( documentId ( ) , '>' , 'xyz' as const ) , orderBy ( '__name__' ) ) // good: first orderBy field is correct
84
- //
85
- //
86
- //
87
- //
88
- //
89
- //
90
- //
91
- query (
92
- colRef ,
93
- // @ts -expect-error
94
- where ( documentId ( ) , '==' , 'xyz' )
95
- ) // bad: no const assertion
96
- query ( colRef , where ( documentId ( ) , '==' , 'xyz' as const ) ) // good: with const assertion
97
- //
98
- //
99
- //
100
- //
101
- //
102
- //
103
- //
104
- query (
105
- colRef ,
106
- // @ts -expect-error
107
- where ( documentId ( ) , '==' , 'xyz' )
108
- ) // bad: no const assertion
109
- query ( colRef , where ( documentId ( ) , '==' , 'xyz' as const ) ) // good: with const assertion
83
+ query ( colRef , where ( documentId ( ) , '>' , 'xyz' ) , orderBy ( '__name__' ) ) // good: first orderBy field is correct
0 commit comments