Commit Graph

84 Commits

Author SHA1 Message Date
Matt
6f89467eb3 [react] Added a "boxShadow" optional property to the "CSSProperties" interface (#14726)
* [react] Added a "boxShadow" optional property to the "CSSProperties" interface.
MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow

* Added a test for CSSProperties.boxShadow
2017-03-10 16:09:13 -08:00
Gaspard Bucher
5a3f029dc4 Add suppressContentEditableWarning to react
* react: add support for the new suppressContentEditableWarning flag
https://github.com/facebook/react/pull/6112
2017-03-02 11:48:06 +01:00
jramsay
b5537a9ca5 Merge pull request #14331 from ericanderson/feature/react-ts21-completeness
React: Update ComponentLifecycle for Readonly & ts 2.1
2017-03-01 15:14:08 -08:00
Emma
dc60ef6f0e add new justify-content property
See https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content
2017-02-25 00:29:57 -07:00
Kanchalai Tanglertsampan
ac7c9faeee Add slot HTML attributes 2017-02-21 14:35:48 -08:00
Zhengbo Li
b7ebd9c00e Merge pull request #14323 from digiguru/svg-animate-tag
Svg animate tag
2017-02-17 13:33:17 -08:00
Yuya Tanaka
580af100e1 react: Use type parameter for currentTarget of animation events 2017-02-15 03:38:11 +09:00
Arthur Ozga
a15be2eed2 Merge pull request #14424 from Strate/patch-2
react: make defaultProps Partial<P>
2017-02-10 14:22:28 -08:00
Arthur Ozga
4916c5a23d Merge pull request #14234 from tkrotoff/react-fontWeight-initial
Fix React fontWeight CSS property
2017-02-08 13:28:21 -08:00
Tanguy Krotoff
eef6cb6ae4 Missing semicolon 2017-02-08 04:29:58 +01:00
Tanguy Krotoff
a1d9875fd8 Introduce CSSLength type to make CSS properties more explicit
Also add tests for SVG specific style attribute declarations
2017-02-08 04:29:38 +01:00
Tanguy Krotoff
14c5647206 Missing new line 2017-02-08 04:27:03 +01:00
Tanguy Krotoff
72e864ff03 Add CSSWideKeyword to all CSS properties 2017-02-08 04:27:03 +01:00
Tanguy Krotoff
efbbb0e0c9 Introduce CSSPercentage type to make CSS properties more explicit 2017-02-08 04:27:03 +01:00
Tanguy Krotoff
9ecb61ea76 Add unit tests for some React.CSSProperties 2017-02-08 04:27:03 +01:00
Kanchalai Tanglertsampan
47f5a06ab0 Revert "Add tests and fix broken test"
This reverts commit d79f340d57.
2017-02-06 17:05:24 -08:00
Kanchalai Tanglertsampan
a3dd726ba3 Revert "Fix #11566 allows SFC to return null"
This reverts commit 81730dfd22.
2017-02-06 17:05:14 -08:00
Artur Eshenbrener
d0128ad516 react: make defaultProps Optional
Actually, defaultProps is `Optional<P>`
2017-02-03 18:13:17 +03:00
Patricio Zavolinsky
ec9bf7f229 React: Constrain typed changed events to inputs, selects and textareas 2017-01-31 09:36:05 +00:00
Tanguy Krotoff
bcf5905e75 Fix fontWeight CSS property 2017-01-30 15:16:43 +01:00
Eric Anderson
d4c58f6b19 Update ComponentLifecycle for Readonly 2017-01-29 17:39:10 -05:00
digiguru
977dcb5098 Adds contribution 2017-01-28 22:00:23 +00:00
digiguru
17befb697c Adds animate tag to the typings
This should fix https://github.com/DefinitelyTyped/DefinitelyTyped/issues/14321
2017-01-28 21:53:44 +00:00
Kanchalai Tanglertsampan
d79f340d57 Add tests and fix broken test 2017-01-27 15:23:51 -08:00
Kanchalai Tanglertsampan
81730dfd22 Fix #11566 allows SFC to return null 2017-01-26 16:36:27 -08:00
Daniel Rosenwasser
6a8f8363f5 Merge pull request #14202 from jwbay/react-props-inference
React - Fix type inference for props. Reverts 80e4d8b/#11612. Fixes #14176
2017-01-25 10:26:42 -08:00
Fredrik Nicol
928c0be342 Add constructor arguments in ClassType 2017-01-24 06:51:47 +01:00
Justin Bay
1001a8eae9 Revert 80e4d8b/#11612. Fixes #14176 2017-01-23 19:33:00 -05:00
Eric Anderson
9b53298395 Support Pick<> on setState now that TS 2.1 is out (#13155)
* Support Partial<> on setState now that TS 2.1 is out

* Update readme to reflect setState being typed correctly

* Switch setState to Pick

* Restore cloneELement portion of readme

* Use Pick<> | S for setState due to cast issue

* state and props should be readonly

* Fix nit + document why we

* Add typescript compiler header

* Update to properly order headers

* Update readme to reflect 2.1.5 fixing stPick

* Update readme now that 2.1.5 is out

* All that depend on react now require 2.1

* Fix definition that fails due to readonly state
2017-01-23 12:36:53 -08:00
John Reilly
a6d113976a Added @pzavolinsky and @bbenezech as maintainers 2017-01-23 12:20:37 +00:00
Patricio Zavolinsky
cfe2a21973 React: add typed target for change events 2017-01-19 08:59:57 +00:00
Pat Sissons
5d8626c1d7 fixing incorrect version header, this should resolve the current npm version issue (#13834) (#13921) 2017-01-10 18:06:54 -08:00
Andy Hanson
0bac9474aa Merge branch 'types-2.0' into merge_jan6 2017-01-06 07:39:21 -08:00
Nathan Wong
78edcdb985 Sync SVG attributes to React 15 (#13101)
* Sync SVG attributes to React 15

* remove old/new distinction and alphabetize list
2017-01-06 07:18:59 -08:00
Artur Eshenbrener
95dd4d0417 react: use more narrow constructor definition (#13769)
This has almost no sense for typescript, but very useful for ide.
At least webstorm uses first constructor definition with `Generate constructor action`.
And, I think it is good to define more narrow method definition earlier that more general.
2017-01-06 06:52:41 -08:00
Andy Hanson
8200deb71d react: Add link about SyntheticEvent.target 2017-01-01 17:19:11 -08:00
Mateusz Lewandowski
d89e3032bd Missing stroke parameters in SVG properties 2016-12-11 17:09:57 +01:00
Johannes Schickling
f9308bf248 Added playsInline property as introduced in React 15.3.2 2016-12-06 22:39:25 +01:00
Paul van Brenk
f0b80f7a84 Merge pull request #12411 from epabst/dedup-react-2
Dedup createElement overloads in react/index.d.ts.
2016-12-05 14:49:53 -08:00
Paul van Brenk
1996e6a1a6 Fix issues and merge more changes from master 2016-11-30 13:54:18 -08:00
Paul van Brenk
40e416a33c Merge master into typings-2.0 2016-11-29 16:51:33 -08:00
Marius Schulz
cc35a9c361 React: add "onReset" form event 2016-11-21 18:58:05 +01:00
Tanguy Krotoff
915c0ea1e7 Fix indentation 2016-11-19 16:44:02 +01:00
Dibyo Majumdar
7838a9c0fb Add xmlns and other attributes to SVGAttributes 2016-11-16 16:05:59 -08:00
Eric Pabst
425bf74b42 Fix indentation and reorder intersection types to avoid conflicts in ts2kt. 2016-11-12 17:48:32 -07:00
Eric Pabst
322ed3c618 Dedup createElement and createFactory overloads in react/index.d.ts.
This is causing issues for ts2kt where it results in duplicate Kotlin methods.
2016-11-12 17:44:59 -07:00
Kanchalai Tanglertsampan
00c4f8e152 Merge branch 'types-2.0' into mergeMaster_11/08 2016-11-10 16:33:23 -08:00
Kanchalai Tanglertsampan
1200f753d6 Merge branch 'master' into types-2.0
# Conflicts:
#	.gitignore
#	ajv/ajv.d.ts
#	angular-material/angular-material.d.ts
#	angular-protractor/angular-protractor.d.ts
#	angularjs/angular-tests.ts
#	angularjs/angular.d.ts
#	aws-sdk/aws-sdk.d.ts
#	electron-devtools-installer/electron-devtools-installer-tests.ts
#	electron-json-storage/electron-json-storage-tests.ts
#	electron-notifications/electron-notifications.d.ts
#	electron-notify/electron-notify.d.ts
#	electron-window-state/electron-window-state.d.ts
#	electron/electron-prebuilt.d.ts
#	enzyme/enzyme.d.ts
#	eventemitter3/eventemitter3-tests.ts
#	eventemitter3/eventemitter3.d.ts
#	graphql/graphql.d.ts
#	highcharts/highcharts.d.ts
#	immutable/immutable.d.ts
#	inquirer/inquirer.d.ts
#	jasmine/jasmine.d.ts
#	joi/joi.d.ts
#	jquery.dataTables/jquery.dataTables-tests.ts
#	jquery.dataTables/jquery.dataTables.d.ts
#	kafka-node/kafka-node.d.ts
#	kefir/kefir.d.ts
#	kendo-ui/kendo-ui.d.ts
#	koa/koa.d.ts
#	leaflet/leaflet.d.ts
#	lodash/lodash.d.ts
#	mapbox-gl/mapbox-gl.d.ts
#	material-ui/material-ui.d.ts
#	menubar/menubar.d.ts
#	mongodb/mongodb.d.ts
#	needle/needle-tests.ts
#	needle/needle.d.ts
#	noble/noble.d.ts
#	node/node.d.ts
#	pegjs/pegjs.d.ts
#	pixi.js/pixi.js.d.ts
#	polymer/polymer.d.ts
#	quill/quill-tests.ts
#	quill/quill.d.ts
#	react-bootstrap/react-bootstrap.d.ts
#	react-fa/react-fa-tests.tsx
#	react-fa/react-fa.d.ts
#	react-native/react-native.d.ts
#	react-select/react-select.d.ts
#	react/react.d.ts
#	threejs/three-vrcontrols.d.ts
#	threejs/three-vreffect.d.ts
#	toastr/toastr.d.ts
#	validator/validator.d.ts
#	webpack/webpack.d.ts
#	winston/winston.d.ts
2016-11-09 17:20:41 -08:00
Alexander Chudesnov
6922165cbb Allow children in stateless components’ props
This allows passing children to `StatelessComponent<P>` exactly like base components without the need to use React.Props<T> or extending the P interface with an explicit 'children' property:

# Before
````typescript
    type FooProps = {
      bar: number;
    }
    const Foo: React.SFC<FooProps> = props => (
      <div>
        {props.children} = {props.bar} // error TS2459: Type 'FooProps' has no property 'children' and no string index signature.
      </div>
    );
````

# After
````typescript
    type FooProps = {
      bar: number;
    }
    const Foo: React.SFC<FooProps> = props => (
      <div>
        {props.children} = {props.bar}
      </div>
    );

    <Foo bar="42">6×9</Foo> // <div>6×9 = 42</div>
````
2016-11-09 21:58:54 +03:00
Linken Dinh
7f9ddef9b8 [types-2.0] react - better strict mode compatibility (#11935)
* strict mode compatible

* include 11931

* vsiao - code review

* vsiao - code review - revert complex cloneelement case

* validator to accept null

* remove double tests

* test use Error | null

* code reviews

* code reviews
2016-11-08 23:53:49 +09:00