mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-26 06:05:54 +08:00
Merge pull request #11362 from cailenmusselman/patch-4
Add navigationContext to react-native Navigator
This commit is contained in:
17
react-native/react-native.d.ts
vendored
17
react-native/react-native.d.ts
vendored
@@ -3247,6 +3247,19 @@ declare namespace __React {
|
||||
debugOverlay?: boolean
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Class that contains the info and methods for app navigation.
|
||||
*/
|
||||
export interface NavigationContext {
|
||||
parent: NavigationContext;
|
||||
top: NavigationContext;
|
||||
currentRoute: any;
|
||||
appendChild(childContext: NavigationContext): void;
|
||||
addListener(eventType: string, listener: () => void, useCapture?: boolean): NativeEventSubscription;
|
||||
emit(eventType: string, data: any, didEmitCallback?: () => void): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use Navigator to transition between different scenes in your app.
|
||||
@@ -3260,7 +3273,9 @@ declare namespace __React {
|
||||
export interface NavigatorStatic extends React.ComponentClass<NavigatorProperties> {
|
||||
SceneConfigs: SceneConfigs;
|
||||
NavigationBar: NavigatorStatic.NavigationBarStatic;
|
||||
BreadcrumbNavigationBar: NavigatorStatic.BreadcrumbNavigationBarStatic
|
||||
BreadcrumbNavigationBar: NavigatorStatic.BreadcrumbNavigationBarStatic;
|
||||
|
||||
navigationContext: NavigationContext;
|
||||
|
||||
getContext( self: any ): NavigatorStatic;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user