mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-29 21:05:29 +08:00
fix: fix navigationOptions type in NavigationScreenConfig<Options> (#5962)
- `NavigationScreenProp<NavigationRoute>` is the type of `navigation` property which contains `state` and such. This is not applicable to `navigationOptions` at all.
This commit is contained in:
committed by
Satyajit Sahoo
parent
35625ded74
commit
a862ebd451
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
|
## Fixes
|
||||||
|
- Fix `navigationOptions` type from `NavigationScreenProp<NavigationRoute>` to `NavigationScreenConfig<Options>`.
|
||||||
|
|
||||||
## [3.11.0]
|
## [3.11.0]
|
||||||
|
|
||||||
## New Features
|
## New Features
|
||||||
|
|||||||
2
typescript/react-navigation.d.ts
vendored
2
typescript/react-navigation.d.ts
vendored
@@ -244,7 +244,7 @@ declare module 'react-navigation' {
|
|||||||
| Options
|
| Options
|
||||||
| ((
|
| ((
|
||||||
navigationOptionsContainer: NavigationScreenConfigProps & {
|
navigationOptionsContainer: NavigationScreenConfigProps & {
|
||||||
navigationOptions: NavigationScreenProp<NavigationRoute>;
|
navigationOptions: NavigationScreenConfig<Options>;
|
||||||
}
|
}
|
||||||
) => Options);
|
) => Options);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user