Stian Didriksen
710de9e694
Fix blunder in #24691 ( #24693 )
...
noModule got added to the wrong element (doh)
2018-04-09 10:41:45 -07:00
Diogo Franco
02ff115ce9
[react] Workaround for --strictFunctionTypes ( #24709 )
...
* [react] Workaround for --strictFunctionTypes
Under --strictFunctionTypes, when assigning a class with `getDerivedStateFromProps` to `React.ComponentClass` or `React.ComponentType`, the type of the second argument was expected to be `Readonly<any>`, which is, actually, the same as `Readonly<{}>`.
This was preventing using classes that try to refer to the previous state in `getDerivedStateFromProps` from being given to HOC factories.
There are no tests as testing this change is only possible with `--strictFunctionTypes`, and the `tsconfig.json` here specifically disables it. Perhaps another PR should enable it.
* Add a test anyway
Though it wouldn't have failed unless `--strictFunctionTypes` were enabled.
* Fix lint error on the test
2018-04-04 06:10:25 +01:00
Tom Crockett
b9cadc9a0f
[react] Use csstype for React.CSSProperties ( #24688 )
...
* Use csstype
* Fix victory test
* Fix aphrodite definitions
* Fix issue link in comment
2018-04-03 22:11:25 +01:00
Paul van Brenk
9bcf9ea644
Merge pull request #24659 from richseviora/RemoveMe
...
[React] Remove Me from Authors List
2018-04-03 11:14:27 -07:00
Stian Didriksen
978c90a6a1
Add noModule to React ScriptHTMLAttributes ( #24691 )
...
React added this in https://github.com/facebook/react/pull/11900
Which is part of the 16.3 release https://github.com/facebook/react/blob/master/CHANGELOG.md#react-dom
2018-04-03 09:53:22 +01:00
Diogo Franco
9a50625d28
Add new React 16.3 lifecycle events ( #24577 )
...
* Add new lifecycle events to React (16.3)
* Add tests, fix lint
* Bump version
* Improve inference of snapshot
* Improve tests
* Correctly support returning partial state from getDerivedStateFromProps
* Remove redundant type
* Fix lint error
* Write the incorrect subclassing test in a more verbose way
2018-04-02 14:59:49 +01:00
Joha2n
5a3e0b2f34
feat(react): add StrictMode definition ( #24629 )
2018-04-02 11:59:11 +01:00
richseviora
21ed509e3e
Remove Rich Seviora from Authors List
2018-03-31 13:21:28 -07:00
Nathan Shively-Sanders
ba7cca96b0
Merge pull request #24321 from craigkovatch/master
...
Add missing `aria-controls` attribute to @types/react WAI-ARIA attributes
2018-03-27 09:38:43 -07:00
Nathan Shively-Sanders
3ee80512f2
Merge pull request #24308 from Oblosys/add-suppress-hydration-warning-attr
...
[react] Add suppressHydrationWarning to React.HTMLAttributes interface
2018-03-27 09:06:05 -07:00
Oblosys
a8dfe1e8c0
[react] Bump minor version: 16.0 ~> 16.1
2018-03-16 16:04:03 +01:00
Oblosys
e6406805ec
[react] Add supressHydrationWarning to React.HTMLAttributes interface
...
Added in 16.1.0 (https://github.com/facebook/react/releases/tag/v16.1.0 )
Docs: https://reactjs.org/docs/dom-elements.html#suppresshydrationwarning
2018-03-16 16:04:03 +01:00
Craig Kovatch
4ae235a416
Add missing 'aria-controls' attribute to React WAI-ARIA typings
2018-03-15 12:12:39 -07:00
Josh Goldberg
b5a88c8e4b
Merge branch 'master' into 'react-no-lib'
2018-03-09 12:08:47 -08:00
Bowden Kelly
86a026db7e
Merge pull request #23856 from guilhermehubner/master
...
[React] Add target to FocusEvent
2018-03-01 10:38:34 -08:00
Josh Headapohl
b3b075efae
@types/react: Update React.Component setState
...
Allow setState to accept an updater which is null or is a function that
may return null.
In React 16, passing null to setState or returning null from the updater
function does not cause an update.
2018-02-28 19:39:53 -05:00
Josh Goldberg
e327a3e895
Sentence fragment
2018-02-26 12:12:31 -08:00
guilhermehubner
26695e8544
[React] Add target to FocusEvent
2018-02-22 14:07:57 -03:00
Josh Goldberg
480c8a8ba8
Removed "dom" from React types tsconfig.json
2018-02-20 15:30:53 -05:00
Andrew Goodale
db733db724
Add HTMLDialogElement to globals for projects without DOM
2018-02-20 13:26:41 -05:00
Andy Hanson
45c9246c09
Remove esModuleInterop from tsconfigs (no longer mandatory)
2018-02-14 14:55:13 -08:00
Michael Blaszczyk
242fcd3080
React: Add crossOrigin attribute to ImgHTMLAttributes interface ( #23587 )
2018-02-13 06:18:06 +00:00
Forbes Lindesay
8f8f6c4392
[react] Use HTMLDialogElement for the dialog node ( #23053 )
...
* [react] Use HTMLDialogElement for the dialog node
* Actually add the `open` property
* This update requires typescript 2.6
* Update dependents of react to also require typescript 2.6
2018-02-12 12:55:52 +00:00
Andy
2a9d2f8d59
Convert more "import *" to "import =" ( #23446 )
2018-02-05 18:27:31 -08:00
Andy
bef4d2b27d
Enable "esModuleInterop" in all tsconfigs ( #23354 )
2018-02-05 11:01:56 -08:00
Josh Goldberg
63cf738f9b
React typings typo: it's vs its ( #23296 )
...
"its" as the plural, not "it's" as "it is".
2018-01-31 12:31:13 -08:00
Andres Kalle
c33af47bb2
react: allow null as props for React.createElement() ( #22837 )
2018-01-24 11:40:08 -08:00
craigkovatch
3460f25329
Add all WAI-ARIA 1.1 attributes to React HTMLAttributes ( #22582 )
...
* Add WAI-ARIA 1.1 attributes to React typings
* Fix linting errors
* Add 'true' and 'false' options to boolean attributes, remove incorrect 'undefined' options
* Add tests
* Revert incorrect use of $ExpectError
2018-01-24 11:00:17 -08:00
Andy
219dd6df82
Fix 'prefer-readonly' lint failures ( #22819 )
2018-01-10 14:59:37 -08:00
Sergei Dryganets
d0db614137
Electron Webview tag support added. ( #22058 )
2018-01-03 13:14:27 -08:00
Tom Crockett
70272e25c4
[React] Make side effect-only callbacks return void instead of any ( #22609 )
2018-01-03 00:08:35 -08:00
Oliver Anteros
00a0a0f5fe
Added "stretch" to "justifyContent" ( #21817 )
2018-01-02 17:37:03 -08:00
Arthur Ozga
f98225f66f
Merge pull request #22057 from dryganets/sergeyd/react-lint
...
void-return and strict-export-declare-modifiers tslint rules disabled as not implemented yet
2017-12-22 18:56:48 -08:00
Eric Anderson
6bf1827a0a
Adjust React's setState to work in more edge cases ( #22236 )
...
* Adjust React's setState to work in more edge cases
Fixes DefinitelyTyped/DefinitelyTyped#22230
Fixes DefinitelyTyped/DefinitelyTyped#18365
* Restore test and naming I lost
2017-12-15 21:50:19 +00:00
Eric Anderson
62c2219a6e
Fix setState to work in callback form and to allow partial intellisense ( #22127 )
...
* Fix setState to work in callback form and to allow partial intellisense
* Fix lint and add tests
* Fix more lint
* Fixing more lint errors i didnt cause
* Add another test case
* Fix more lint
2017-12-13 23:15:45 +00:00
Mine Starks
c33c4a1ec2
Merge pull request #20937 from kaelig/patch-1
...
react: Add `as` attribute to AllHTMLAttributes
2017-12-11 17:06:24 -08:00
Gaurav Lahoti
d157c184cc
moved controlsList to MediaHTMLAttributes
2017-12-11 15:53:02 +05:30
Gaurav Lahoti
51c5e1bd34
support for controlsList attribute on video
2017-12-11 05:36:40 +05:30
Sergei Dryganets
833eeee25b
some of the not implemented lint rules disabled for react
2017-12-08 12:11:54 -08:00
Bowden Kelly
8f8dda2fd4
Merge pull request #21895 from appsforartists/borderRadius
...
Add borderRadius to @types/react
2017-12-06 13:37:09 -08:00
John Gozde
13a6e92a7f
Revert 'type' changes
2017-12-04 11:49:38 -07:00
John Gozde
5afa32483e
Prefer disable-next-line
2017-12-04 11:33:33 -07:00
John Gozde
d105bd4c8d
Use ComponentType for React.Fragment
2017-12-04 10:27:42 -07:00
Brenton Simpson
cfc910c1d0
Replaced tslint-disable with tsline-disable-line
...
These aren't lines this PR otherwise touches, but it won't build without them.
2017-12-01 16:30:31 -08:00
Brenton Simpson
8ca44be1a4
Fixed borderRadius types
...
React's `borderRadius` [can only be](https://github.com/facebook/react/blob/master/packages/react-dom/src/shared/dangerousStyleValue.js ) a `string` or a `number`, so the type should reflect that.
See also #20743
2017-12-01 16:30:30 -08:00
Brenton Simpson
bd0c4e78c4
Added borderRadius to CSSProperties
...
Fixes https://github.com/smyte/jsxstyle/issues/92
2017-12-01 11:48:22 -08:00
Benjamin Lichtman
b4855506d3
Merge pull request #21146 from uniqueiniquity/jsxFragment
...
Add React.Fragment to top-level API in React
2017-11-30 16:50:24 -05:00
Tomáš Hübelbauer
6cb103319f
Mark React's prevState in setState function as ReadOnly (immutable) ( #21591 )
...
* Mark prevState in setState function as ReadOnly (immutable)
* Fix casing
2017-11-17 14:32:16 +00:00
Nathan Shively-Sanders
3be79d3033
Merge pull request #21415 from styfle/patch-14
...
Add width property on ColHTMLAttributes in react
2017-11-16 08:44:47 -08:00
Nathan Shively-Sanders
d686e159c6
Merge pull request #21381 from kaelig/patch-2
...
React: Add crossOrigin html attribute to the link element
2017-11-14 15:30:43 -08:00