Skip to content

Commit 39aab7e

Browse files
committed
Copied over type changes from npm package
1 parent 3534625 commit 39aab7e

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

types/navigation-react.d.ts

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
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';
33

44
/**
55
* Navigation event data
@@ -32,6 +32,20 @@ export interface NavigationEvent<NavigationInfo extends { [index: string]: any }
3232
*/
3333
export var NavigationContext: Context<NavigationEvent<any, any>> & Context<NavigationEvent<any, string>>;
3434

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+
3549
/**
3650
* The hook that provides the current navigation event data
3751
*/
@@ -45,10 +59,6 @@ export interface NavigationHandlerProps {
4559
* The state navigator that triggers navigation events
4660
*/
4761
stateNavigator: StateNavigator;
48-
/**
49-
* Streams react server components
50-
*/
51-
fetchRSC?: (url: string, options: any) => Promise<any>;
5262
/**
5363
* The rendered content
5464
*/
@@ -175,7 +185,7 @@ export interface SceneViewProps<NavigationInfo extends { [index: string]: any }
175185
*/
176186
active: (keyof NavigationInfo & string) | (keyof NavigationInfo & string)[] | ((stateContext: StateContext) => boolean);
177187
/**
178-
* The name identifying the View when fetching RSCs
188+
* The name identifying the View when fetching RSC
179189
*/
180190
name?: string;
181191
/**

0 commit comments

Comments
 (0)