@@ -7,16 +7,19 @@ import * as AppTypes from '@firebase/app-types'
7
7
import { Dispatch } from 'redux'
8
8
//* * Declaration file generated by dts-gen */
9
9
10
+ // Diff / Omit taken from https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html
11
+ type Omit < T , K extends keyof T > = Pick < T , Exclude < keyof T , K > >
12
+
10
13
// Injects props and removes them from the prop requirements.
11
14
// Will not pass through the injected props if they are passed in during
12
15
// render. Also adds new prop requirements from TNeedsProps.
13
16
export interface InferableComponentEnhancerWithProps <
14
17
TInjectedProps ,
15
18
TNeedsProps
16
19
> {
17
- < P extends TInjectedProps > ( component : Component < P > ) : React . ComponentType <
18
- Omit < P , keyof TInjectedProps > & TNeedsProps
19
- >
20
+ < P extends TInjectedProps > (
21
+ component : React . Component < P >
22
+ ) : React . ComponentType < Omit < P , keyof TInjectedProps > & TNeedsProps >
20
23
}
21
24
22
25
type mapper < TInner , TOutter > = ( input : TInner ) => TOutter
@@ -447,11 +450,11 @@ export interface WithFirebaseProps<ProfileType> {
447
450
/**
448
451
* React HOC that attaches/detaches Firebase Real Time Database listeners on mount/unmount
449
452
*/
450
- export function firebaseConnect < TInner = { } > (
453
+ export function firebaseConnect < ProfileType , TInner = { } > (
451
454
connect ?: mapper < TInner , string [ ] > | string [ ]
452
455
) : InferableComponentEnhancerWithProps <
453
- TInner & WithFirebaseProps ,
454
- WithFirebaseProps
456
+ TInner & WithFirebaseProps < ProfileType > ,
457
+ WithFirebaseProps < ProfileType >
455
458
>
456
459
457
460
/**
@@ -510,7 +513,7 @@ export function populate(
510
513
* Needed to use HOCs like firebaseConnect and withFirebase.
511
514
*/
512
515
export function ReactReduxFirebaseProvider < any > (
513
- props : ReacanyReduxFirebaseProviderProps < any >
516
+ props : ReactReduxFirebaseProviderProps < any >
514
517
) : any
515
518
516
519
/**
0 commit comments