Commit Graph

77 Commits

Author SHA1 Message Date
Basarat Ali Syed
983cd5df09 Revert "React : test for modernComponent" 2015-06-15 10:01:01 +10:00
Basarat Ali Syed
78deea6ba8 Syntax for modernComponent
Is this test valid @pspeter3? Regarding : 9008be2f41
2015-06-02 17:28:20 +10:00
Vincent Siao
7b47d0c977 [React] Update README (0.13.3) 2015-05-28 15:33:04 -07:00
Vincent Siao
1cc5ea01d8 [React] Update HTMLAttributes interface
removes `scrollLeft`, `scrollTop` (0.12.0)
adds `formAction`, `formEncType`, `formMethod`, `formTarget`, `marginHeight`, `marginWidth` (0.12.2)
adds `scoped`, `high`, `low`, `optimum`, `unselectable` (0.13.2)
2015-05-28 15:30:16 -07:00
Vincent Siao
bb793321c6 [React] change ShallowRenderer output to ReactElement 2015-05-28 14:18:58 -07:00
Vincent Siao
3ca8ceb795 [react] Make var addons into a module
This lets you do import aliasing (eg. `import TestUtils = React.addons.TestUtils;`)
2015-05-27 18:43:23 -07:00
Mads
2dabe041c4 whoops, syntax error 2015-05-14 18:57:45 +02:00
Mads
9a53f5ee84 UpdateSpec properties should be optional 2015-05-07 07:57:08 +02:00
Igor Ovsiannikov
39d3517c6f feat(react): add DragEvent to react-addons.d.ts 2015-04-22 21:38:28 +03:00
Igor Ovsiannikov
41a0837326 feat(react): add DragEvent 2015-04-20 20:58:25 +03:00
Vincent Siao
b35ac04569 React 0.13.0->0.13.1 and make arguments to Component constructor optional 2015-03-18 09:46:36 -07:00
Vincent Siao
424bb99eac Don't use DOM API interfaces for React.SVGAttributes 2015-03-14 16:15:59 -07:00
Vincent Siao
d3584fa716 Add ReactShallowRenderer types
See http://facebook.github.io/react/docs/test-utils.html#shallow-rendering
2015-03-14 15:29:40 -07:00
Vincent Siao
0213f7c10e Fix state initializers in react-tests.ts (Fixes #3855) 2015-03-14 15:29:15 -07:00
Vincent Siao
ffedf917df Remove beta and RC2 references from React defs 2015-03-14 15:27:46 -07:00
Phips Peter
57340eca1e Moving React 0.13 to be the default
React 0.13 is now released so it should be the default type definition.
http://facebook.github.io/react/blog/2015/03/10/react-v0.13.html
2015-03-10 19:03:37 -07:00
Vincent Siao
cbe9f0b94a Remove React.ModernXX interfaces
React.ModernElement -> React.ReactElement
React.ModernFactory -> React.Factory
React.ModernComponentClass -> React.ComponentClass
2015-03-10 18:36:27 -07:00
Vincent Siao
4cc6ae4122 Remove React prefix from Modern/Classic/DOM Elements 2015-03-10 18:36:27 -07:00
Vincent Siao
69a3c97655 Rename React.XXXBase types to React.XXX to simplify general typing 2015-03-10 18:36:26 -07:00
Vincent Siao
ec9b82e646 Update React v0.13.0 definitions for RC2
+ `React.cloneElement`
+ `React.addons.createFragment`
+ `setState(f: (prevState: S, props: P) => S, callback?: () => any)`
+ `ref: (component: T) => any`
2015-03-10 18:36:26 -07:00
Vincent Siao
70779548d5 Remove Context generics from React 0.13 defs 2015-02-24 17:29:52 -08:00
Vincent Siao
f19e070599 Add global React defs and a README 2015-02-13 18:10:28 -08:00
Vincent Siao
92c95d8c40 Take shared Props (key, ref, children) out of ReactAttributes and rename to DOMAttribtues 2015-02-12 16:19:03 -08:00
Vincent Siao
9ce634af3a Split modules react and react/addons; exporting Component<P, S, C> class 2015-02-06 17:22:15 -08:00
Hraban Luyat
3d84b2d7f3 [react 0.13] Adapt unit tests to new classic API
Allows to use the API with one less type cast.
2015-01-30 14:43:26 +01:00
Hraban Luyat
f6da4b13b8 Discern new vs old style components through render
By overloading createElement() for the ClassicComponentClass and
creating a separate ReactClassicElement type, we can keep track of which
calls to render() should create a ClassicComponent versus a new style
Component. Useful for keeping the old API, which makes migration easier.
2015-01-30 06:09:39 +01:00
James Brantly
28cf35055a Adding early support for React v0.13.0 2015-01-28 01:31:44 -05:00
Vincent Siao
54e4632ca7 Revert "Change most uses of ComponentClass<P> to a type that represents the class"
This reverts commit 7bb2b48cd2.

Conflicts:
	react/react.d.ts
2015-01-22 18:51:18 -08:00
Vincent Siao
e12488eb5c Fix ReactType references and ReactNode types 2015-01-21 16:22:06 -08:00
Vincent Siao
8194252213 Update react.d.ts for Typescript 1.4 2015-01-21 15:51:16 -08:00
jbrantly
7bb2b48cd2 Change most uses of ComponentClass<P> to a type that represents the class
This more accurately reflects that createClass returns a class, not an
instance of a class. This will be more important as React v0.13 is released
which supports using ES6 classes as components.
2015-01-19 15:11:02 -05:00
Vincent Siao
660d263565 Change React.React.Attributes.key type to any // number | string 2014-12-12 16:10:24 -08:00
Vincent Siao
dbb10b35c6 Add React.ClassSet interface and properly extend CSSTransitionGroup from TransitionGroup; +tests in react-addons-tests 2014-12-09 18:49:31 -08:00
Vincent Siao
0fb398c774 Add React.Children tests and change callback param return types from void to any 2014-12-08 15:41:47 -08:00
Vincent Siao
b4174b1ff1 Add some attributes tests to react-tests and remove index signature from React.CSSProperties 2014-12-08 14:55:10 -08:00
Vincent Siao
cc25144fde remove React.ComponentElement<P> and rename Factory<P> to ComponentFactory<P> 2014-12-05 12:37:13 -08:00
Vincent Siao
b8a0461280 React.Instance<P> -> React.Component<P>; add React.DOM.picture and extra HTML attributes 2014-12-03 14:56:30 -08:00
Vincent Siao
9a9ff2ed08 Move Browser interfaces into React module 2014-12-02 21:59:46 -08:00
Vincent Siao
cdc1fe2ad0 Fix React.ComponentInstance<P>.refs type and add some CSS properties 2014-12-02 20:32:38 -08:00
Vincent Siao
01cfe48a46 Change React.createFactory to take React.ComponentClass<P> 2014-12-02 19:43:17 -08:00
Vincent Siao
db0333df59 React.Instance<P> -> React.ElementInstance<P> 2014-12-02 19:18:58 -08:00
Vincent Siao
5c4c344b1e Fill out React.SVGAttributes types 2014-12-02 18:51:27 -08:00
Vincent Siao
4c069d5d6e Fill out HTMLAttributes types 2014-12-02 18:30:10 -08:00
Vincent Siao
7f4cdee628 ReactClass -> ComponentClass; add tests to react-tests.ts 2014-12-02 18:11:15 -08:00
Vincent Siao
a99c1ad839 Cleanup react.d.ts; introduce Instance<P> interface to replace DomReferencer<P>; alias EventHandler types; etc... 2014-12-02 17:00:15 -08:00
Phips Peter
09f788d73f Merging React and React with Addons
This seems simpler and enables developers to only require the addons
they want.
2014-12-01 13:29:31 -08:00
Steve Baker
c7d900175e add factory test 2014-11-13 20:25:46 +01:00
Steve Baker
64dcdb9702 add convenience overload to getDOMNode 2014-11-13 20:05:32 +01:00
Steve Baker
fa6e45ea4c allow calling component or element functions no arguments 2014-11-13 18:30:05 +01:00
Phips Peter
10a78d4323 Adding createElement
This is based off the work of @jnetterf in
https://github.com/Asana/typed-react/pull/24/files#diff-4
2014-10-22 17:11:22 -07:00