Skip to content

Commit 22651e4

Browse files
committed
v2.8.0 support TS 5.4.2
1 parent ec82c9d commit 22651e4

File tree

4 files changed

+17
-12
lines changed

4 files changed

+17
-12
lines changed

package-lock.json

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "firelord",
3-
"version": "2.7.2",
3+
"version": "2.8.0",
44
"description": "🔥 Write V9 like Firestore Admin code with extreme type safety.",
55
"author": "tylim",
66
"license": "MIT",
@@ -91,7 +91,7 @@
9191
"prettier": "^2.8.6",
9292
"pretty-quick": "^3.1.3",
9393
"rollup": "^2.79.1",
94-
"typescript": "^5.2.2",
94+
"typescript": "^5.4.2",
9595
"vitest": "^0.29.7"
9696
},
9797
"peerDependencies": {

src/queryConstraints/offset.ts

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { Offset } from '../types'
99
* @param offset The offset to apply to the Query results.
1010
* @returns A {@link QueryConstraint} to pass to `query()`
1111
*/
12+
// @ts-expect-error
1213
export const offset: Offset = offset => {
1314
return {
1415
type: 'offset',

src/refs/query.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,30 @@ import { handleEmptyArray } from './utils'
1414
export const query: QueryFunction = (query, ...queryConstraints) => {
1515
const ref = query as OriQuery<MetaType>
1616
// ! need revisit
17-
// @ts-expect-error
1817
return queryConstraints.reduce((ref, qc) => {
1918
const type = qc.type
2019
if (type === 'where') {
20+
// @ts-expect-error
2121
return ref[type](qc.fieldPath, qc.opStr, qc.value)
2222
} else if (type === 'orderBy') {
23+
// @ts-expect-error
2324
return ref[type](qc.fieldPath, qc.directionStr)
2425
} else if (
2526
type === 'limit' ||
2627
type === 'limitToLast' ||
2728
type === 'offset'
2829
) {
30+
// @ts-expect-error
2931
return ref[type](qc.value)
3032
} else if (
3133
type === 'startAt' ||
3234
type === 'startAfter' ||
3335
type === 'endAt' ||
3436
type === 'endBefore'
3537
) {
38+
// @ts-expect-error
3639
return handleEmptyArray(qc.values, ref, () => ref[type](...qc.values))
3740
}
41+
// @ts-expect-error
3842
}, ref)
3943
}

0 commit comments

Comments
 (0)