-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from tylim88/new-features
cleanup and rename setting
- Loading branch information
Showing
40 changed files
with
282 additions
and
333 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
import { OriWriteBatch, OriDocumentReference, WriteBatchDelete } from '../types' | ||
|
||
export const deleteCreator = ((writeBatch: OriWriteBatch) => | ||
(reference: OriDocumentReference) => { | ||
const ref = writeBatch.delete(reference) | ||
return ref | ||
}) as unknown as (writeBatch: OriWriteBatch) => WriteBatchDelete | ||
export const deleteCreator = (writeBatch: OriWriteBatch) => | ||
((reference: OriDocumentReference) => { | ||
return writeBatch.delete(reference) | ||
}) as WriteBatchDelete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { OriWriteBatch, OriDocumentReference, WriteBatchUpdate } from '../types' | ||
import { flatten } from '../utils' | ||
|
||
export const updateCreator = ((writeBatch: OriWriteBatch) => | ||
(reference: OriDocumentReference, data: Record<string, unknown>) => { | ||
export const updateCreator = (writeBatch: OriWriteBatch) => | ||
((reference: OriDocumentReference, data: Record<string, unknown>) => { | ||
const ref = writeBatch.update( | ||
reference, | ||
// @ts-expect-error | ||
flatten(data) | ||
) | ||
return ref | ||
}) as unknown as (writeBatch: OriWriteBatch) => WriteBatchUpdate | ||
}) as WriteBatchUpdate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
import { deleteDoc as deleteDoc_ } from 'firebase/firestore' | ||
import { OriDocumentReference, Delete } from '../types' | ||
|
||
/** | ||
Deletes the document referred to by the specified DocumentReference. | ||
@param reference — A reference to the document to delete. | ||
@returns A Promise resolved once the document has been successfully deleted from the backend (note that it won't resolve while you're offline). | ||
*/ | ||
export const deleteDoc = ((reference: OriDocumentReference) => { | ||
const ref = deleteDoc_(reference) | ||
return ref | ||
}) as unknown as Delete | ||
return deleteDoc_(reference) | ||
}) as Delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.