Commit Graph

64 Commits

Author SHA1 Message Date
Masahiro Wakame
7ccb1759f9 Merge pull request #5131 from benishouga/add-react-svg
React: Added attributes 'width' and 'height' to SVGAttributes for Rect.
2015-08-08 14:33:35 +09:00
Masahiro Wakame
c7253f4a93 Merge pull request #5133 from maglar0/master
React: Support for defaultValue in HTMLAttributes
2015-08-08 13:54:45 +09:00
Masahiro Wakame
c1ea194664 Merge pull request #5201 from use-strict/react-context-any
react - Replaced context any with {} for type safety.
2015-08-08 13:53:54 +09:00
benishouga
a117cbd73e add svg attribute width and height for rect element. SVGAttribute inherit DOMAttributes. 2015-08-06 03:22:04 +09:00
Lars Magnusson
6d59069216 Support for defaultValue and defaultChecked in HTMLAttributes (used on input and textarea and others) 2015-08-04 20:19:03 +02:00
Ciuca, Alexandru
1a9ee560ef react - Replaced any with {} for context
See https://github.com/Microsoft/TypeScript/issues/4126
2015-08-04 11:10:07 +03:00
Nathan Brown
207710d2a0 React: Include required render() function in base Component class.
The new TSX mode in the TypeScript compiler has the requirements that
the element class constructor produces an element instance type that is
assignable to the type JSX.ElementClass.  To meet this Component<P, S>
must declare `render(): JSX.Element`.  Derived classes can be more
specific.

This should resolve Microsoft/TypeScript#3928.
2015-08-03 17:08:03 -07:00
benishouga
62bb9fd807 SVGAttributes inherit HTMLAttributes. fixed react-addons.d.ts and react-global.d.ts. 2015-08-04 00:01:32 +09:00
benishouga
8c18f7d318 add svg attribute width and height for react element. 2015-07-30 01:03:33 +09:00
Ryan Cavanaugh
bfcf082b40 Go back to old style of React typings and merge in JSX to both 2015-07-06 15:58:01 -07:00
Ryan Cavanaugh
8833ceece1 Combine internal/external React .d.ts files and prepare for TS JSX support 2015-06-23 09:42:37 -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
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
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
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
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
Phips Peter
c4d3efb7f1 Fixing isValidClass and isValidElement
The terminology is confusing right now.
2014-10-17 16:51:08 -07:00
Phips Peter
17d211f896 Adding createFactory
Forgot about this piece but is important for removing warnings.
2014-10-17 16:42:11 -07:00
Phips Peter
f547d80f49 Removed descriptors from our code 2014-10-17 16:24:11 -07:00
Phips Peter
51b6fad247 Adding the new Element types
https://gist.github.com/sebmarkbage/fcb1b6ab493b0c77d589
2014-10-17 13:22:14 -07:00
Phips Peter
8b6079cfcd Removing transferPropsTo 2014-10-17 12:29:45 -07:00
Phips Peter
d908e8f3bf Renaming based on the new React API
http://facebook.github.io/react/blog/2014/10/16/react-v0.12-rc1.html#renamed-apis
2014-10-17 12:26:28 -07:00
Phips Peter
8336da666d Renaming the legacy module for tests
Apparently they conflict otherwise which is unfortunate.
2014-10-17 12:14:42 -07:00
Phips Peter
0259c7fba1 Adding ReactAttributes
These were missing before
2014-10-03 11:49:52 -07:00
Phips Peter
596ab8e1ee Fixing renderComponent
It should return a descriptor, not be void.
2014-10-03 10:25:49 -07:00
Austen Talbot
c01768cc27 Added type definitions for react-addons 2014-10-01 18:38:22 -07:00
Phips Peter
bf5cd4b9b1 Starting react-addons module
We will use module merging to merge addons into the existing react
context.
2014-10-01 14:19:40 -07:00