Commit Graph

27 Commits

Author SHA1 Message Date
John Gozde
bbf3e9cb0b [react]: Remove deprecated+removed APIs (#20409)
* create-react-class: add definitions

* react-dom-factories: add definitions

* create-react-class: add tests, fix errors

* react-dom-factories: add tests, fix lint

* react: remove previously deprecated APIs

* Remove deprecated usages in other definitions

* redux-form: disable strictFunctionTypes

Changes to react typings revealed errors in redux-form that are present
in 'master'. This needs to be handled separately.

* Update create-react-class, react-dom-factories author

* Avoid importing create-react-class where possible

* Move top-level createReactClass tests to create-react-class
2017-10-16 15:22:04 -07:00
cynecx
0b21b7dd63 [react] [react-dom] Add support for rendering an array of elements (#19363)
* Test

* Fix react typings

* Revert "Use []-syntax for some cases."

This reverts commit 5f6e55843980b2cff9ace4174f72b4f8aa7ad278.

* Modify another render function's return type

* Use Array<T> instead in react.d.ts & Fix issues with the typescript linter & Adapt changes in react-router

* Convert Array<T> to T[]

* Add support for string and number return types.
2017-10-06 19:08:29 +01:00
Andy
924fafffc0 Fix remaining lint errors (#19166) 2017-08-20 15:37:53 -07:00
Egor Shulga
b51a8da34b Add dtslint type assertion test. 2017-08-11 17:44:07 +03:00
Egor Shulga
1d8a7055cf add withRouter decorator 2017-08-09 15:03:53 +03:00
Stéphane Goetz
a24aee6125 Improve react typings for HTML attributes, fix tests in other libraries 2017-07-10 22:43:07 +02:00
Ryan Cavanaugh
fec422d226 Merge pull request #17611 from tkrotoff/react-router-component
Refactoring: use React.ComponentType
2017-07-10 09:41:41 -07:00
mtpc
bc710a72d6 Make Route component extensible
Shouldn't have any impact whatsoever in existing codebases due to default generics
2017-07-04 21:17:49 +02:00
Tanguy Krotoff
552051f56f Default props should be {}, not undefined or void 2017-06-29 14:00:18 +02:00
Tanguy Krotoff
13a594f24e Move the official examples to directory examples-from-react-router-website 2017-06-28 03:03:42 +02:00
Tanguy Krotoff
b6cc600508 null! => null thanks to PR #17021 2017-06-28 02:23:02 +02:00
Tanguy Krotoff
573083a518 Replace React.Component<(any|void|\{\}|null)> by React.Component
+ many manual adjustments
2017-06-21 09:48:37 +02:00
Tanguy Krotoff
ea9de8a518 Replace React.Component<(.*), (any|void|\{\}|null)> by React.Component<$1>
+ many manual adjustments
2017-06-19 13:35:50 +02:00
Nathan Shively-Sanders
4874667de9 Fix primitive weak type errors
These weak type errors were not caught in TS 2.4 RC. The final TS 2.4
will catch weak type errors with primitives, so this PR fixes those
now-caught errors.
2017-06-15 11:46:46 -07:00
Michael Strobel
3b1ba96df2 [react-router] add RouteComponentProps.staticContext (#16812)
* [react-router] add RouteComponentProps.staticContext

* [react-router] revert RouteConfig test file

* [react-router] Add example for StaticRouter and staticContext
2017-05-31 21:56:38 -07:00
Daniel Rosenwasser
3b8b7625b7 Lints. 2017-05-30 01:17:26 -07:00
Daniel Rosenwasser
4e4890ccc8 Added tests for 'children' set to both elements and functions to elements in 'react-router'. 2017-05-30 00:58:35 -07:00
DaIgeb
fe1b612ef0 Allow component props for withRouter (#16339) 2017-05-05 10:38:55 -07:00
DaIgeb
585178525c Update SwitchProps to support typescript 2.3 (#16340)
SwitchProps.children is too strict for projects using typescript 2.3.
With typescript 2.3 the children could be made mandatory, but this will
break backwards compatibility with any ts 2.2 user
2017-05-05 10:11:16 -07:00
Mohamed Hegazy
e564537f7f Fix lint failures (#16329)
* fix lint failures

* Fix more lint failures

* Fix some more lint errors
2017-05-04 15:31:42 -07:00
Denis
ddb6d939c3 TS Linting react-router (#16240)
- Using default `dtslint/dt.json` for linting
2017-05-01 13:47:36 -07:00
Jeremy Fauvel
cb42760188 Add missing Redirect props (#16195)
Add an optional extended description…
2017-04-28 10:54:07 -07:00
Nathan Shively-Sanders
f4ce20f619 Merge pull request #15403 from kryops/react-router4
react-router MemoryRouter.initialEntries can be string[]
2017-04-06 09:03:33 -07:00
Andy
68e0aea47a Lint additional react packages (#15527) 2017-03-30 14:25:38 -07:00
Michael Strobel
4a2542e4af react-router MemoryRouter.initialEntries
* Use History.LocationDescriptor[]
* Add example
2017-03-29 08:07:50 +08:00
Huy Nguyen
3e626b8949 Add type of context for react-router & react-router-dom
The `Router` component passes a context object down to children.  This
commit adds the type definition for this context object for children of
`Router` to use.
2017-03-28 13:57:16 -04:00
Andy Hanson
354cec620d Move all packages to a types directory 2017-03-24 14:27:52 -07:00