Artem
3e39c3ebbd
ReactPortal extends ReactElement. ( #28264 )
2018-08-26 19:05:59 +01:00
Luke Ivanchenko-Cooney
f4982fb3fc
Add decoding attribute to img tag ( #28126 )
2018-08-15 18:46:54 +01:00
Ron Buckton
938504dea1
Merge pull request #27914 from franklixuefei/patch-3
...
Pass any as the state type to ComponentClass
2018-08-13 11:36:01 -07:00
Ferdy Budhidharma
b64d3c7f23
add PropTypes.exact ( #27996 )
2018-08-09 18:56:57 +01:00
Frank Li
321d420029
Update index.d.ts
2018-08-08 15:45:30 -07:00
Frank Li
45b4987c5d
Revert back to previous commit
2018-08-08 15:43:43 -07:00
Frank Li
364acc11c0
Added back the lint error suppressor
2018-08-08 15:01:49 -07:00
Frank Li
7406afd1ff
Passing any to StaticLifecycle
...
Passing `any` to `StaticLifecycle` to prevent `{}` type locking on state param of `getDerivedStateFromProps` when using `ComponentType<P>`
2018-08-08 15:00:23 -07:00
Frank Li
b037ef15f3
Made ComponentState type to point to any
2018-08-07 16:59:25 -07:00
Frank Li
21cfc7d247
Update index.d.ts
2018-08-06 15:36:22 -07:00
Frank Li
ebb16b2d2d
Pass any as the state type to ComponentClass
...
Pass any as the state type to ComponentClass from ComponentType.
2018-08-06 15:13:23 -07:00
Ferdy Budhidharma
1d9679b2dc
[react] add library managed attributes and upgrade TS requirement to 2.8 ( #27901 )
...
* feat(react): add library managed attributes and upgrade to 2.8
* fix broken tests
* fix lint errors
2018-08-06 18:51:26 +01:00
pravdomil
09468a17a1
Allow pass ComponentClass state to StaticLifecycle ( #27417 )
...
* Update index.d.ts
* set default state to empty object
* use S instead ComponentState
* defaults to ComponentState
2018-07-23 11:40:00 -07:00
Hank Fanchiu
73c1a6ca60
Fix "compoment" typo in index.d.ts ( #27454 )
2018-07-23 08:34:52 -07:00
Ferdy Budhidharma
ffc8351127
[prop-types] use conditional types for better prop type inference ( #27378 )
...
* feat(prop-types): use conditional types for better prop type inference
* fix(tests): fix publish tests
* fix(prop-types): add custom prop validator, and switch requireables
* fix(test): revert ReactFragment change
* fix(prop-types): namespace imports from react like a good boy
* CR changes
* actually remove param from validator
* remove anyvalidationmap
* everyday i'm test...ering
* SEMICOLONS WHY
* retain null in undefaultize
2018-07-21 13:41:15 +01:00
Martin Hochel
a5b0278214
revert(react): remove null union from state which is a BC ( #26946 )
2018-06-29 13:44:58 +01:00
Dmytro Kozlov
14a76fc8e4
Allow to initialize state in constructor ( #26912 )
...
Partial rollback of the https://github.com/DefinitelyTyped/DefinitelyTyped/pull/26813 that allow developers to follow react recommended way of initializing state in constructor
2018-06-28 13:08:11 +01:00
Kyle Crum
c6abfdd9e8
Add autoComplete to the select element ( #26879 )
...
* Add autoComplete to the select element
This is a valid attribute per https://html.spec.whatwg.org/multipage/form-elements.html#the-select-element
* fix reflux tests which were not passing the attributes to the super class
2018-06-27 21:05:43 +01:00
Martin Hochel
542f3c08a5
feat(react): improve props and state typesafety on Component
...
- fix(react): remove failing expectation on TS 2.6
- chore(react): add myself to contributors
2018-06-26 11:06:17 +02:00
Olivier PASCAL
64219b1c0d
[@types/react] Fix attribute capture to be an overloaded boolean ( #26823 )
2018-06-25 18:57:58 +01:00
Nathan Shively-Sanders
e889c4aa51
Merge pull request #26595 from devuxer/master
...
Added href to SVGAttributes<T> for React
2018-06-19 09:16:48 -07:00
devuxer
2aabf9153a
Added href to SVGAttributes<T>
...
According to MDN, `xlink:href` has been deprecated. The recommendation is to use `href` (without the namespace prefix) instead.
Source: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href
2018-06-18 16:57:43 -07:00
Nathan Shively-Sanders
b618d9812e
Merge pull request #26363 from lostfictions/add-react-pointer-events
...
[@types/react] Upgrade types for React 16.4; add Pointer Events support (wip, awaiting feedback)
2018-06-18 14:48:15 -07:00
devuxer
914bbd67a8
Added href to SVGAttributes<T>
...
According to MDN, `xlink:href` has been deprecated. The recommendation is to use `href` (without the namespace prefix) instead.
Source: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href
2018-06-15 18:10:55 -07:00
Christopher Deutsch
d5c2d6a0e3
Add type property for <ol>
...
https://developer.mozilla.org/en-US/docs/Web/API/HTMLOListElement
2018-06-09 13:03:58 -05:00
lostfictions
f5e38c5242
add Pointer Events support to React
2018-06-07 20:01:36 -04:00
Armando Aguirre
2f1c881b33
Merge pull request #26216 from Asana/mark-react-16.3
...
In react/index.d.ts, add default type annotation <T = Element> to SyntheticEvent and EventHandler types
2018-06-06 13:11:32 -07:00
kingdaro
ed64b074de
undo accidental changes to react
2018-06-04 22:36:11 -04:00
kingdaro
0f89c402b2
@reach/router: enable strict flags in tsconfig
2018-06-04 22:29:54 -04:00
Mark Yao
6ddc57f14d
Add T=Element defaults
2018-06-04 11:20:50 -07:00
Benjamin Lichtman
d007ed8f4b
Merge pull request #26009 from Crashthatch/master
...
react: change default type value of ComponentLifecycle snapshot to any
2018-05-31 15:35:48 -07:00
Wouter van Heeswijk
f5afb177e5
Replace placeholder array by actual recursive array
2018-05-25 14:44:21 +02:00
Tom Fletcher
de36724537
change default type value of ComponentLifecycle snapshot to any
2018-05-24 17:07:54 +01:00
Mark Polak
012108d8c6
Remove as attribute from AnchorHTMLAttributes ( #25388 )
2018-05-07 11:45:27 -07:00
Sean Scally
4891ddcd3a
Remove overload ( #25150 )
...
It should not be a valid case for createContext to take no arguments.
2018-04-26 15:48:32 -07:00
Jacob Gillespie
c9de295a09
react: change default type value of snapshot to any ( #24987 )
...
* Add getSnapshotBeforeUpdate test for React.createElement
* Add test for using component with new lifecycles
* Add test for pure component with new lifecycle methods
* Chage react snapshot SS to default to any
2018-04-19 11:19:37 -07:00
Sean Scally
2053e1cb8c
Add new RenderProps-style Context from React 16.3 ( #24509 )
...
* Add new RenderProps-style Context from React 16.3
React 16.3 has a new recommended API for Context, with new Context, Provider, and Consumer typings.
* Add overload for createContext() to be called with no arguments
* Fix syntax
* Refactor out Props for Consumer & Provider
2018-04-16 13:37:41 +01:00
Fredrik Nicol
3b4991e3fa
[react] Add comment about removed index signature ( #24939 )
2018-04-13 07:44:22 +01:00
Tom Crockett
fe3fcd77c9
[React] Remove string index fallback for CSS properties ( #24911 )
...
* [React] Remove string index fallback for CSS properties (resolves #24568 )
* Require a minimum version of 2.2 for csstype
* Fix aphrodite types
* Fix react-confirm test
* Use Omit
* Fix react-geosuggest types
* Fix victory test
* Make customStyle and customStyleOnEditCell into functions
2018-04-11 22:34:31 +01:00
Josh Goldberg
40c7baae32
Removed myself from React types authors list ( #24921 )
...
So many notifications!
2018-04-11 12:13:03 -07:00
Shadowglen Elf
1efaacbdd0
props in cloneElement should be Partial<P> & Attributes instead of workaround ( #24641 )
2018-04-10 10:44:49 -07:00
Ferdy Budhidharma
130f2eec2f
[react] add forwardRef and createRef functions for React v16.3 ( #24624 )
...
* feat(react): add forwardRef and createRef functions
* fix(tests): fix failing tests
- datepicker needs to be updated to use optional generic types since it was using ClassAttributes incorrectly
2018-04-10 10:22:57 -07:00
Rasmus Eneman
5515e867df
[react-dom] fix signature of findDOMNode ( #24211 )
...
fixes #24167
2018-04-10 10:21:14 -07:00
Adam Epling
c63b81da94
Add placeholder, for use in contentEditable elements ( #24539 )
...
* Added `placeholder` to the list of standard attributes, to allow its use on contentEditable <div> elements.
* Added placeholder for use in contentEditable elements in React.
2018-04-09 14:04:30 -07:00
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