File tree Expand file tree Collapse file tree 4 files changed +7
-9
lines changed Expand file tree Collapse file tree 4 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 1
1
// @flow
2
- import type { FirebaseUser as User } from 'firebase';
3
- import type { Auth } from 'firebase/auth';
4
- import typeof { Error as AuthError } from 'firebase/auth';
2
+ import type { Auth, AuthError, User } from 'firebase/auth';
5
3
6
4
type LoadingHook<T> = [T | void, boolean, AuthError | void];
7
5
Original file line number Diff line number Diff line change 1
1
// @flow
2
- import typeof { FirebaseError } from 'firebase';
3
2
import type { DataSnapshot, Query } from 'firebase/database';
4
3
5
- type LoadingHook<T> = [T | void, boolean, FirebaseError | void];
4
+ type LoadingHook<T> = [T | void, boolean, Error | void];
6
5
7
6
export type ListHook = LoadingHook<DataSnapshot[]>;
8
7
export type ListKeysHook = LoadingHook<string[]>;
Original file line number Diff line number Diff line change 2
2
import type {
3
3
DocumentReference,
4
4
DocumentSnapshot,
5
- GetOptions,
6
5
Query,
7
6
QuerySnapshot,
8
7
SnapshotListenOptions,
9
8
} from 'firebase/firestore';
10
9
11
10
type LoadingHook<T> = [T | void, boolean, Error | void];
12
11
12
+ export type GetOptions = {
13
+ source?: 'default' | 'server' | 'cache';
14
+ };
13
15
export type CollectionHook = LoadingHook<QuerySnapshot>;
14
16
export type CollectionDataHook<T> = LoadingHook<T[]>;
15
17
export type DocumentHook = LoadingHook<DocumentSnapshot>;
Original file line number Diff line number Diff line change 1
1
// @flow
2
- import typeof { FirebaseError } from 'firebase';
3
- import type { Reference } from 'firebase/storage';
2
+ import type { Reference, StorageError } from 'firebase/storage';
4
3
5
- type LoadingHook<T> = [T | void, boolean, FirebaseError | void];
4
+ type LoadingHook<T> = [T | void, boolean, StorageError | void];
6
5
7
6
export type DownloadURLHook = LoadingHook<string>;
8
7
declare export function useDownloadURL(ref?: Reference | null): DownloadURLHook;
You can’t perform that action at this time.
0 commit comments