Commit Graph

203 Commits

Author SHA1 Message Date
Jeroen Vervaeke
9c0e5d4bac
Merged upstream/master 2018-11-30 00:36:59 +01:00
Mine Starks
97f607bb75
Merge pull request #30440 from mattmccutchen/react-navigation-strictfunctiontypes
react-navigation: Make declarations work with strictFunctionTypes.
2018-11-29 09:29:21 -08:00
Benjamin Lichtman
75847884eb
Merge pull request #30415 from chagasaway/improves-react-navigation-typings
Improves react-navigation typings
2018-11-26 06:34:59 -08:00
Fellipe Chagas
dabc2bf03a Adds JSDocs to the new NavigationLeafRoute params 2018-11-22 18:41:13 -02:00
Benjamin Lichtman
54d6a99319
Merge pull request #30478 from walterh-sportsbet/react-navigation-add-experimental-prop-transparentCard
[react-navigation] add experimental prop transparentCard
2018-11-21 09:37:47 -08:00
Benjamin Lichtman
47ff707bc3
Merge pull request #30114 from alechill/react-navigation-injected-props-state-leaf-route
[react-navigation] Injected navigation props route state is incorrect
2018-11-20 09:42:01 -08:00
Jeroen Vervaeke
1acadfde0d
Removed trailing whitespace 2018-11-17 16:43:21 +01:00
Jeroen Vervaeke
aee31fb6ad
Ran 'npm run lint package-name' 2018-11-17 00:45:18 +01:00
Jeroen Vervaeke
95b71e55e5
Improved DrawerItems 2018-11-17 00:22:54 +01:00
Lukas Havlicek
cf27af28ad Fixed missing optional "drawerLockMode" property in "NavigationRouteConfig" interface, values for "drawerLockMode" as a separate exported type (#30436) 2018-11-15 13:29:18 -08:00
walterh
1319b54f69 react-navigation: add experimental prop transparentCard 2018-11-13 10:56:32 +11:00
Matt McCutchen
8b93c6cd5b react-navigation: Make declarations work with strictFunctionTypes.
Believed to fix https://stackoverflow.com/q/53154003.

This reverts 4464cbbfe7.  I was unable to
reproduce the issue that that commit was originally trying to fix.
Without reverting it, the BackButtonWithNavigationWithExplicitProps test
fails on typescript@next.
2018-11-10 19:27:38 -05:00
Fellipe Chagas
eea8aaf433 Adjusts compilation errors 2018-11-09 15:58:46 -02:00
Fellipe Chagas
8f2e78835f Improves react-navigation typings 2018-11-09 15:19:11 -02:00
Alec Hill
6fc53e3995
Merge branch 'master' into react-navigation-injected-props-state-leaf-route 2018-11-07 16:06:41 +00:00
Lachlan
cfa477710a React Navigation: headerLayoutPreset && headerBackTitleVisible (#29833)
* Update types for stack navigator

https://reactnavigation.org/docs/en/stack-navigator.html

* unecessary `

* add tests?

* What type is this Ref

* commit a log

* define Ref Types in tests

* does not have any construct or call signatures | the methods causing this error arent even used

* All tests passing

* WIP

* add to test

* why do I need graphql-tools

* diff

* wip

* cleanup

* lol

* remove console.log

* remove ref Types
2018-11-06 18:22:51 -08:00
Alec Hill
118b858929
Merge branch 'master' into react-navigation-injected-props-state-leaf-route 2018-11-01 12:45:19 +00:00
Alec Hill
6acfee7450 Removed Slessi from authors on request 2018-10-29 15:47:20 +00:00
Alec Hill
732040440d Injected navigation props were incorrectly typed to provide only non-leaf route state props. Added tests for both kinds of injected route state. 2018-10-29 12:25:51 +00:00
Jason Killian
355583adc8 add horizontal prop to tabBarIcon option 2018-10-23 14:57:56 -04:00
Andy
d8bab0f3be
More fixes from dtslint improvements (2) (#29799) 2018-10-17 12:59:50 -07:00
Ilker Güller
4464cbbfe7 react-navigation: Updated withNavigation HOC for suppressing prop requirement (#29208)
## Why?

Typescript requires assign of `navigation` on Component that is created with `withNavigation` HOC. But it comes with that function so it shouldn't require that property.

## Example

```typescript
//
// on the current version, this will give an error.
// with this PR, it will work.
//
interface IHelloProps extends Partial<NavigationInjectedProps> {
  hello: boolean;
}

const HelloBox: SFC<IHelloProps> = ({ navigation, hello }) => (
<View>
<TouchableHighlightCustom onPress={() => navigation.navigate('TEST', { hello })}>
        <Text>Hello</Text>
      </TouchableHighlightCustom>
</View>;
);

export default withNavigation(HelloBox);
```
----

Please fill in this template.

- [X] Use a meaningful title for the pull request. Include the name of the package modified.
- [X] Test the change in your own code. (Compile and run.)
- [x] Add or edit tests to reflect the change. (Run with `npm test`.)
- [x] Follow the advice from the [readme](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md#make-a-pull-request).
- [X] Avoid [common mistakes](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md#common-mistakes).
- [X] Run `npm run lint package-name` (or `tsc` if no `tslint.json` is present).

Select one of these and delete the others:

If adding a new definition:
- [ ] The package does not already provide its own types, or cannot have its `.d.ts` files generated via `--declaration`
- [ ] If this is for an NPM package, match the name. If not, do not conflict with the name of an NPM package.
- [ ] Create it with `dts-gen --dt`, not by basing it on an existing project.
- [ ] `tslint.json` should be present, and `tsconfig.json` should have `noImplicitAny`, `noImplicitThis`, `strictNullChecks`, and `strictFunctionTypes` set to `true`.

If changing an existing definition:
- [ ] Provide a URL to documentation or source code which provides context for the suggested changes: <<url here>>
- [ ] Increase the version number in the header if appropriate.
- [ ] If you are making substantial changes, consider adding a `tslint.json` containing `{ "extends": "dtslint/dt.json" }`.

If removing a declaration:
- [ ] If a package was never on DefinitelyTyped, you don't need to do anything. (If you wrote a package and provided types, you don't need to register it with us.)
- [ ] Delete the package's directory.
- [ ] Add it to `notNeededPackages.json`.
2018-10-05 15:01:34 -07:00
Max Davidson
1ac3032b21
Improve HOC type inference 2018-09-27 14:03:43 +02:00
Dimitry
764a8a745c
Support params in generic withNavigation HOC 2018-09-24 10:26:34 +03:00
mickaelw
b59997949e Added type definitions for React Navigation (#28742) 2018-09-14 09:57:07 -07:00
Linus Unnebäck
074ace3372 react-navigation: Add params to state property (#28703) 2018-09-11 08:16:19 -07:00
Armando Aguirre
11ad4ef86e
Merge pull request #28233 from DenisFrezzato/master
[react-navigation] Fix navigationOptions type
2018-08-29 11:20:53 -07:00
DenisFrezzato
a3a71e170c Fix type of replace action. 2018-08-29 12:08:41 +02:00
Vincent Langlet
b5b41c82fa
Add tests 2018-08-27 12:16:35 +02:00
Vincent Langlet
692c76c786
Add static Height 2018-08-27 12:11:23 +02:00
DenisFrezzato
e8a0c4402e [react-navigation] Fix navigationOptions differences between createTabNavigator and createBottomTabNavigator. 2018-08-24 09:22:51 +02:00
Roberto Huertas
f5b87f3c5e fix(author): remove robertohuertasm from owners 2018-08-23 01:15:03 +02:00
Daniel Rosenwasser
2867d6a385
Merge pull request #28198 from taboulot/patch-5
[react-navigation] Update NavigationActions API v2
2018-08-22 13:28:48 -07:00
Daniel Rosenwasser
55b1bac6c4
Merge pull request #28093 from PatronGG/react-navigation-navigation-events
react-navigation: add NavigationEvents component
2018-08-22 13:02:08 -07:00
Clément
e7c35dc812
Update Test 2018-08-17 16:49:19 +02:00
Clément
d6fba2b95b
Update NavigationActions API v2 2018-08-17 16:43:27 +02:00
Benjamin Lichtman
9caa83c743
Merge pull request #27904 from LinusU/react-navigation-fallback
[react-navigation] Fix return type when fallback provided
2018-08-14 10:30:39 -07:00
Benjamin Lichtman
e49cd4aaf5
Merge pull request #28073 from MassiveMediaMatch/master
[react-navigation] Support for dispatching NavigationCompleteTransitionAction
2018-08-14 10:29:20 -07:00
Linus Unnebäck
b7887d9d66
[react-navigation] Remove robertohuertasm from authors 2018-08-14 14:27:18 +01:00
Linus Unnebäck
1021fbf970
Merge branch 'master' into react-navigation-fallback 2018-08-14 14:01:19 +01:00
Gustavo Brunoro
7b6c32205b react-navigation: add NavigationEvents component 2018-08-13 21:24:57 -03:00
LauR3y
983aa9cc64
Support for dispatching NavigationCompleteTransitionAction 2018-08-13 13:28:00 +02:00
hosomichi
6c3a8bf5ab
Merge branch 'master' into master 2018-08-09 10:57:12 +09:00
Linus Unnebäck
2e2da74160
Merge branch 'master' into react-navigation-fallback 2018-08-08 22:49:14 +01:00
Jake
69e3a50789 [@types/react-navigation] Added missing NavigationReplaceAction type variant to NavigationStackAction 2018-08-09 00:43:24 +08:00
seki
ce784479a0 [react-navigation] add exportation StackViewTransitionConfigs 2018-08-07 17:59:59 +09:00
Linus Unnebäck
965956065f
[react-navigation] Fix return type when fallback provided 2018-08-06 19:49:39 +01:00
Ferdy Budhidharma
bc0c933415 feat(react-dependents): update to TS 2.8 (part 2 of 2) (#27744)
* feat(react-dependents): update to ts 2.8

* fix version mismatches

* remove package.json

* post merge updates

* add package.json back again
2018-08-06 06:28:42 +01:00
Sergei Butko
6ddd9ea45d Add DrawerNavigationState (#27512) 2018-07-23 15:49:52 -07:00
Sergei Butko
dcd9338caa Add NavigationPushAction into NavigationStackAction type (#27511) 2018-07-23 12:23:18 -07:00