Commit Graph
128 Commits
Author SHA1 Message Date
Arthur OzgaandGitHub 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 AndersonandJohn Reilly 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 AndersonandJohn Reilly 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 StarksandGitHub 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 KellyandGitHub 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 LichtmanandGitHub 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übelbauerandJohn Reilly 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-SandersandGitHub 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-SandersandGitHub 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
Nathan Shively-SandersandGitHub 9dfed25882 Merge pull request #21324 from Herman-Freund/master
[@types/react] SVGAttributes' strokeMiterlimit Should accept number or string
2017-11-14 15:07:31 -08:00
StevenandGitHub 112b361c31 Add width property on ColHTMLAttributes in react 2017-11-10 16:31:07 -05:00
Kaelig Deloumeau-PrigentandGitHub 759b981de1 Alphabetically order props in LinkHTMLAttributes 2017-11-09 13:26:45 -05:00
Kaelig Deloumeau-PrigentandGitHub 65feecd9a1 React v15: Add crossOrigin html attribute to the link element 2017-11-09 13:23:37 -05:00
Kaelig Deloumeau-PrigentandGitHub 0c3841a9d8 React v16: Add crossOrigin html attribute to the link element 2017-11-09 13:22:19 -05:00
Igor OleinikovandGitHub ecabf5526f Merge pull request #20987 from pelotom/patch-10
[react] Make component constructor props non-optional
2017-11-08 13:58:44 -08:00
Tom CrockettandJohn Reilly 31ace05ea4 [react] Add optional props type parameter to ReactType (#21322) 2017-11-07 22:23:11 +00:00
Herman-FreundandGitHub 402d56507f React v15 - Updated index.d.ts
Updated SVGAttributes' strokeMiterlimit to accept number or string
2017-11-07 16:00:16 -05:00
Herman-FreundandGitHub b80407270a React - Updated index.d.ts
Updated SVGAttributes' strokeMiterlimit to accept number or string
2017-11-07 15:57:46 -05:00
Nathan Shively-SandersandGitHub 66f36eb2be Merge pull request #21233 from AviVahl/master
Backport ts 2.6.1 fix to @types/react@15
2017-11-06 08:57:12 -08:00
Avi Vahl 2f8cf5bc0e Backport ts 2.6.1 fix to @types/react@15
For those of us who want to upgrade to the latest version of TypeScript, but haven't gotten around to upgrade our app to react 16 yet.

The bivarianceHack seems like an ugly workaround, but that's how @types/react@16 work atm.
2017-11-03 20:12:28 +02:00
Rasmus Eneman 4657bbe7ac fix rendering types for React 16 2017-11-01 14:33:09 +01:00
uniqueiniquity 4d07771b6c Add create fragment test 2017-10-31 10:19:43 -07:00
uniqueiniquity f6904a2eab Update test 2017-10-31 08:50:40 -07:00
uniqueiniquity b5d2594134 Add fragment to top-level API 2017-10-31 08:41:00 -07:00
Paul ColleoniandAndy 1cf7a72cb6 [react] added backgroundSize to the CSSProperties (#20862) 2017-10-30 08:04:35 -07:00
Tom Crockett e9f19bb876 Make component constructor props non-optional 2017-10-24 17:45:37 -07:00
Kaelig Deloumeau-PrigentandGitHub 17fd72797f Add as attribute to AllHTMLAttributes 2017-10-23 15:16:24 -07:00
Paulo CesarandJohn Reilly 10612bcf84 Update index.d.ts (#20811)
remove duplicated `as`
2017-10-22 15:39:35 +01:00
Kaelig Deloumeau-PrigentandJohn Reilly ed36d5538f react: Add "as" attribute to link elements (#20628)
* Add "as" attribute to links

See corresponding addition here: https://github.com/facebook/react/pull/7582

* Add "as" attribute to link elements in React v16 definition

* Turn commas into semicolons (React 15)

* Turn commas into semicolons (React 16)
2017-10-22 05:38:18 +01:00
Artem MalkoandJohn Reilly 38e3db12b8 react Add 'as' attribute for link element (#20769) 2017-10-20 19:36:49 +01:00
Josh RutherfordandJohn Reilly 1fb244abed react-dom: add createPortal API (#20245). (#20336)
* react-dom: add createPortal API.

* React, React-DOM: move portal interface to types/react, update render for class components to include ReactPortal.

* react-dom: add second portal test case with jsx, allow jsx in react-dom-tests.

* react, react-dom createPortal api: remove undocumented arguments, properties.
2017-10-19 11:40:47 +01:00
Richard JedličkaandAndy f487a1c111 [react] Fix isValidElement to accept any type (#20641)
* [react] Fix `isValidElement` to accept `any` type

* [react] Fix `isValidElement` method param type

Change `object` parameter type from `any` to more explicit.
2017-10-17 11:58:39 -07:00
John GozdeandAndy 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
Rasmus EnemanandAndy f92fedd919 @types/react: Add documentation to confusing event properties (#20595)
These properties can be non-obvious and some doc comments could be helpful
2017-10-16 15:09:26 -07:00
Benoit VandAndy 016a82b4eb Update index.d.ts (#20499)
Reference: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a
Broken by: https://github.com/DefinitelyTyped/DefinitelyTyped/commit/a24aee6125213ba20a5bda15a5d4fce8b60b2f57
React documentation for the supported "type" attribute: https://reactjs.org/docs/dom-elements.html
2017-10-16 13:19:44 -07:00
Nicu MicleușanuandAndy 3d41a7ce59 react: Add support for more SVG elements (#19871) 2017-10-16 09:03:27 -07:00
AndyandGitHub 947a8fb761 Enable strictFunctionTypes (#20373) 2017-10-06 14:03:03 -07:00
cynecxandJohn Reilly 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
Nathan Shively-Sanders ba5a8c2243 Merge branch 'master' into fix-for-strictFunctionTypes 2017-10-03 13:05:23 -07:00
StevenandRyan Cavanaugh e54b30fafc react-dom: Upgrade to v16.0.0 (#20065)
* Add hydrate method

* Add hydrate to react-dom-tests.ts

* Fix whitespace

* Create shared interface for `render` and `hydrate`

* Add renderToNodeStream and renderToStaticNodeStream methods in ReactDomServer

* Add proper nodejs.readablestream

* Add react-dom v15 for backwards compatibility

* Add proper baseUrl for react-dom/v15

* Change react test _interval type to NodeJS.Timer

* Export the renderer interface

* Change react/v15 to use NodeJS.Timer
2017-10-02 16:08:01 -07:00
Nathan Shively-Sanders b8ea87c68e Strict function variance fixes round 1 2017-10-02 15:50:34 -07:00