Skip to content

Commit 03ef720

Browse files
committed
fix(contextBinder): fix typings (exclude Suspense from hook)
1 parent d3fb725 commit 03ef720

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/utils/src/contextBinder.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Observable } from "rxjs"
2-
import { bind } from "@react-rxjs/core"
2+
import { bind, SUSPENSE } from "@react-rxjs/core"
33

44
type SubstractTuples<A1, A2> = A2 extends [unknown, ...infer Rest2]
55
? A1 extends [unknown, ...infer Rest1]
@@ -26,7 +26,7 @@ export function contextBinder<
2626
getObservable: (...args: ARGS) => Observable<T>,
2727
defaultValue?: T | undefined,
2828
) => [
29-
(...args: SubstractTuples<ARGS, OT>) => T,
29+
(...args: SubstractTuples<ARGS, OT>) => Exclude<T, typeof SUSPENSE>,
3030
(...args: ARGS) => Observable<T>,
3131
]
3232
export function contextBinder(...args: any[]) {

0 commit comments

Comments
 (0)