File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 44 * leverage React Suspense API while we are waiting for that value.
55 */
66export const SUSPENSE = Symbol ( "SUSPENSE" )
7-
8- export const filterOutSuspense = < T > (
9- value : T ,
10- ) : value is Exclude < T , typeof SUSPENSE > => value !== ( SUSPENSE as any )
7+ export type SUSPENSE = typeof SUSPENSE
Original file line number Diff line number Diff line change 11import { useRef , useState } from "react"
2- import { SUSPENSE , filterOutSuspense } from "./SUSPENSE"
2+ import { SUSPENSE } from "./SUSPENSE"
33import { DefaultedStateObservable , StateObservable } from "@rxstate/core"
44import { EMPTY_VALUE } from "./internal/empty-value"
55import useSyncExternalStore from "./internal/useSyncExternalStore"
@@ -12,6 +12,9 @@ interface Ref<T> {
1212 args : [ ( cb : VoidCb ) => VoidCb , ( ) => Exclude < T , typeof SUSPENSE > ]
1313}
1414
15+ const filterOutSuspense = < T > ( value : T ) : value is Exclude < T , SUSPENSE > =>
16+ value !== ( SUSPENSE as any )
17+
1518export const useStateObservable = < O > (
1619 source$ : StateObservable < O > ,
1720) : Exclude < O , typeof SUSPENSE > => {
You can’t perform that action at this time.
0 commit comments