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 4
4
* leverage React Suspense API while we are waiting for that value.
5
5
*/
6
6
export 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 1
1
import { useRef , useState } from "react"
2
- import { SUSPENSE , filterOutSuspense } from "./SUSPENSE"
2
+ import { SUSPENSE } from "./SUSPENSE"
3
3
import { DefaultedStateObservable , StateObservable } from "@rxstate/core"
4
4
import { EMPTY_VALUE } from "./internal/empty-value"
5
5
import useSyncExternalStore from "./internal/useSyncExternalStore"
@@ -12,6 +12,9 @@ interface Ref<T> {
12
12
args : [ ( cb : VoidCb ) => VoidCb , ( ) => Exclude < T , typeof SUSPENSE > ]
13
13
}
14
14
15
+ const filterOutSuspense = < T > ( value : T ) : value is Exclude < T , SUSPENSE > =>
16
+ value !== ( SUSPENSE as any )
17
+
15
18
export const useStateObservable = < O > (
16
19
source$ : StateObservable < O > ,
17
20
) : Exclude < O , typeof SUSPENSE > => {
You can’t perform that action at this time.
0 commit comments