1
1
import { State , StateNavigator , FluentNavigator , StateContext } from 'navigation' ;
2
- import { Component , Context , AnchorHTMLAttributes , DetailedHTMLProps , MouseEvent , ReactNode , ComponentType } from 'react' ;
2
+ import { Component , Context , AnchorHTMLAttributes , DetailedHTMLProps , MouseEvent , ReactNode , ComponentType , Dispatch , SetStateAction } from 'react' ;
3
3
4
4
/**
5
5
* Navigation event data
@@ -32,6 +32,20 @@ export interface NavigationEvent<NavigationInfo extends { [index: string]: any }
32
32
*/
33
33
export var NavigationContext : Context < NavigationEvent < any , any > > & Context < NavigationEvent < any , string > > ;
34
34
35
+ /**
36
+ * The RSC bundler context
37
+ */
38
+ export var BundlerContext : Context < {
39
+ /**
40
+ * Streams RSC
41
+ */
42
+ deserialize : ( url : string , options : any ) => Promise < any > ;
43
+ /**
44
+ * Updates the root RSC content
45
+ */
46
+ setRoot : Dispatch < SetStateAction < Promise < any > > > ;
47
+ } > ;
48
+
35
49
/**
36
50
* The hook that provides the current navigation event data
37
51
*/
@@ -45,10 +59,6 @@ export interface NavigationHandlerProps {
45
59
* The state navigator that triggers navigation events
46
60
*/
47
61
stateNavigator : StateNavigator ;
48
- /**
49
- * Streams react server components
50
- */
51
- fetchRSC ?: ( url : string , options : any ) => Promise < any > ;
52
62
/**
53
63
* The rendered content
54
64
*/
@@ -175,7 +185,7 @@ export interface SceneViewProps<NavigationInfo extends { [index: string]: any }
175
185
*/
176
186
active : ( keyof NavigationInfo & string ) | ( keyof NavigationInfo & string ) [ ] | ( ( stateContext : StateContext ) => boolean ) ;
177
187
/**
178
- * The name identifying the View when fetching RSCs
188
+ * The name identifying the View when fetching RSC
179
189
*/
180
190
name ?: string ;
181
191
/**
0 commit comments