Skip to content

Commit d72324a

Browse files
committed
bug fixes
1 parent 26f03ea commit d72324a

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

index.d.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,19 @@ import * as AppTypes from '@firebase/app-types'
77
import { Dispatch } from 'redux'
88
//* * Declaration file generated by dts-gen */
99

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+
1013
// Injects props and removes them from the prop requirements.
1114
// Will not pass through the injected props if they are passed in during
1215
// render. Also adds new prop requirements from TNeedsProps.
1316
export interface InferableComponentEnhancerWithProps<
1417
TInjectedProps,
1518
TNeedsProps
1619
> {
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>
2023
}
2124

2225
type mapper<TInner, TOutter> = (input: TInner) => TOutter
@@ -447,11 +450,11 @@ export interface WithFirebaseProps<ProfileType> {
447450
/**
448451
* React HOC that attaches/detaches Firebase Real Time Database listeners on mount/unmount
449452
*/
450-
export function firebaseConnect<TInner = {}>(
453+
export function firebaseConnect<ProfileType, TInner = {}>(
451454
connect?: mapper<TInner, string[]> | string[]
452455
): InferableComponentEnhancerWithProps<
453-
TInner & WithFirebaseProps,
454-
WithFirebaseProps
456+
TInner & WithFirebaseProps<ProfileType>,
457+
WithFirebaseProps<ProfileType>
455458
>
456459

457460
/**
@@ -510,7 +513,7 @@ export function populate(
510513
* Needed to use HOCs like firebaseConnect and withFirebase.
511514
*/
512515
export function ReactReduxFirebaseProvider<any>(
513-
props: ReacanyReduxFirebaseProviderProps<any>
516+
props: ReactReduxFirebaseProviderProps<any>
514517
): any
515518

516519
/**

0 commit comments

Comments
 (0)