-
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 #48 from tylim88/new-features
housekeeping
- Loading branch information
Showing
8 changed files
with
63 additions
and
14 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
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,29 @@ | ||
import { MetaTypeCreator, getFirelord, query, where } from 'firelordjs' | ||
import { MetaTypeCreator, getFirelord } from 'firelordjs' | ||
|
||
const firelord = getFirelord() | ||
|
||
type abc = MetaTypeCreator< | ||
type Parent = MetaTypeCreator< | ||
{ | ||
a: { b: number; c: number } | ||
d: number | ||
a: 1 | ||
}, | ||
'abc', | ||
'a', | ||
string | ||
> | ||
const firelordParent = getFirelord<Parent>() | ||
const ParentCollectionGroupQuery = firelordParent('a').collectionGroup() | ||
|
||
type Child = MetaTypeCreator< | ||
{ | ||
a: 1 | ||
}, | ||
'b', | ||
string, | ||
Parent | ||
> | ||
const firelordChild = getFirelord<Child>() | ||
|
||
const ChildCollectionGroupQuery = firelordChild( | ||
'a/putAnyStringHere/b' | ||
).collectionGroup() | ||
|
||
const a = [1, 2, 3].forEach(i => { | ||
exports[i] | ||
}) |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { MetaTypeCreator, getFirelord, query, where } from 'firelordjs' | ||
|
||
const firelord = getFirelord() | ||
|
||
type abc = MetaTypeCreator< | ||
{ | ||
a: { b: number; c: number } | ||
d: number | ||
}, | ||
'abc', | ||
string | ||
> |
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,11 +1,18 @@ | ||
import { getFirelord } from 'firelordjs' | ||
import { initializeApp } from 'firebase/app' | ||
import { Example } from './dataType' | ||
import { getFirestore } from 'firebase/firestore' | ||
|
||
initializeApp({ | ||
apiKey: '### FIREBASE API KEY ###', | ||
authDomain: '### FIREBASE AUTH DOMAIN ###', | ||
projectId: '### CLOUD FIRESTORE PROJECT ID ###', | ||
}) | ||
|
||
export const example = getFirelord<Example>()('SomeCollectionName') | ||
export const db = getFirestore() | ||
|
||
const firelordExample = getFirelord<Example>(db) | ||
// OR | ||
const firelordExample_Alt = getFirelord<Example>() | ||
|
||
export const example = firelordExample('SomeCollectionName') |
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