Skip to content

Commit

Permalink
remove unnecessary ?
Browse files Browse the repository at this point in the history
  • Loading branch information
tylim88 committed Apr 5, 2024
1 parent 6cb0089 commit 28a9cea
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/batch/set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { OriWriteBatch, WriteBatchSet } from '../types'
export const setCreator =
(writeBatch: OriWriteBatch): WriteBatchSet =>
// @ts-expect-error
(reference, data, options?) => {
(reference, data, options) => {
return writeBatch.set(
// @ts-expect-error
reference,
Expand Down
7 changes: 1 addition & 6 deletions src/operations/onSnapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@ export const isOptions = (
return v?.includeMetadataChanges !== undefined // includeMetadataChanges is boolean, so check for undefined
}

export const onSnapshot: OnSnapshot = (
reference,
onNext,
onError?,
options?
) => {
export const onSnapshot: OnSnapshot = (reference, onNext, onError, options) => {
const newOnError = isOptions(onError) ? undefined : onError
const newOptions = isOptions(onError) ? onError : options || {}

Expand Down
2 changes: 1 addition & 1 deletion src/operations/setDoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { setDoc as setDoc_ } from 'firebase/firestore'
* @returns A Promise resolved once the data has been successfully written
* to the backend (note that it won't resolve while you're offline).
*/
export const setDoc: Set = (reference, data, options?) => {
export const setDoc: Set = (reference, data, options) => {
return setDoc_(
// @ts-expect-error
reference,
Expand Down
2 changes: 1 addition & 1 deletion src/queryConstraints/orderBy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ import { OrderBy } from '../types'
* not specified, order will be ascending.
* @returns The created {@link Query}.
*/
export const orderBy: OrderBy = (fieldPath, directionStr?) => {
export const orderBy: OrderBy = (fieldPath, directionStr) => {
return { type: 'orderBy', fieldPath, ref: orderBy_(fieldPath, directionStr) }
}
2 changes: 1 addition & 1 deletion src/transaction/set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { OriTransaction, TransactionSet } from '../types'
export const setCreator =
(transaction: OriTransaction): TransactionSet =>
// @ts-expect-error
(reference, data, options?) => {
(reference, data, options) => {
return transaction.set(
// @ts-expect-error
reference,
Expand Down

0 comments on commit 28a9cea

Please sign in to comment.