Linda_pp
50b9b6c6d5
react-addons-perf: Update APIs to version 15.1.0 ( #9662 )
...
* react-addons-perf: Update APIs to version 15.1.0
https://facebook.github.io/react/docs/perf.html
* Add deprecation comment to printDOM()
* Add more exported APIs
d101f68bce/src/renderers/shared/ReactPerf.js (L432)
2016-06-19 12:19:33 +09:00
Nicholas Lydon
08ed4e9f18
React TestUtils SyntheticEventData extends browser Event ( #9000 )
...
* SyntheticEventData extends browser Event
From https://facebook.github.io/react/docs/events.html
Your event handlers will be passed instances of SyntheticEvent, a
cross-browser wrapper around the browser's native event. It has the same
interface as the browser's native event, including stopPropagation() and
preventDefault(), except the events work identically across all
browsers.
* make react synthetic event properties optional
2016-04-27 12:56:38 +09:00
Sean Kelley
b9642fb8ac
Allow specifying void for component state type parameter. ( #8673 )
...
* Allow specifying `void` for component state type parameter.
Per comments on https://github.com/DefinitelyTyped/DefinitelyTyped/pull/8543 ,
the type parameter for component state was changed to `{}` from `any` for
increased type safety, but prevents specifying (non-functional) stateless
components without having empty state parameters, which seems messy. This
changes the type to `{} | void` to allow this while staying stricter than
`any`.
* Make react tests a bit more strict.
* Rename State -> ComponentState to make it a bit more explicit.
2016-04-13 00:40:40 +09:00
Vincent Siao
1a67b639ce
[react] Add ComponentElement<P, T> for instance type inference
2016-03-14 02:05:24 -07:00
Vincent Siao
5e85e146c6
[react] ReactTestUtils custom typeguards
2016-03-14 01:46:14 -07:00
Vincent Siao
1917a4122a
[react] Add T param to React.DOM* types
2016-03-14 01:46:13 -07:00
Vincent Siao
92cf86a3e2
[react] Deprecate React.Props<T>; Add React.*Attributes
2016-03-14 01:46:13 -07:00
Vincent Siao
edb41e7850
[react] better return-type inference for (scry|find)RenderedComponent(s?)WithType
2016-02-26 18:33:14 -08:00
Vincent Siao
a3d2b67d36
[react] improve React.cloneElement with F-bounded polymorphism
2016-02-26 18:33:14 -08:00
Vincent Siao
d76bfa3394
[React] Add SFC displayName and fix onlyChild type
...
- `StatelessComponent` is missing an optional `displayName` property
- `ReactChildren.only` always returns a `ReactElement`
- add tests for the above and `ReactTestUtils.renderIntoDocument`
2015-12-09 12:07:28 -08:00
Ryan Cavanaugh
d7465b3fbe
Merge branch 'master' into reactSFC
2015-12-01 14:26:53 -08:00
Adi Dahiya
ca5bfe76d2
Fix linting errors in react typings
2015-11-18 14:37:45 -05:00
Ryan Cavanaugh
f4e53f321c
Update react-tests.ts
2015-11-12 15:20:28 -08:00
James Brantly
bb72880cd3
Add custom classes support to CSSTransitionGroup
2015-11-11 08:55:17 -05:00
Vincent Siao
813f3b03db
[React.14] Add checkedLink/valueLink to HTMLAttributes for LinkedStateMixin
2015-11-10 23:43:36 -08:00
Vincent Siao
84340fabfc
Merge branch 'react-v14' of github.com:jbrantly/DefinitelyTyped into react-v14
2015-11-09 17:43:58 -08:00
Vincent Siao
8345d38855
[React.14] Add StatelessComponent<P> and tests
...
- Also add image to JSX.IntrinsicElements
- Add tests for callback and string refs
- Fix bug where Component<P, S> subclasses are required to have defaultProps
2015-11-09 17:39:55 -08:00
Phips Peter
cba13a3b25
Add shallow-compare addon
...
Interestingly, I do not believe that the ComponentLifecycle interface is
propagated to components that inherit from React.Component.
2015-11-05 17:56:28 -08:00
Vincent Siao
15eff541e0
[React.14] Update refs for DOM elements
2015-11-05 10:41:07 -08:00
James Brantly
619033254c
Update tests for v0.14 and refactor how addons expose interfaces.
2015-11-05 07:01:14 -05:00
Tom Hasner
bf061642b0
Write typings for React.Children.toArray and React.Children.map
2015-11-02 22:59:15 -05:00
Ciuca, Alexandru
64cd3d9c56
Fixed react tests caused by incompatibility of aliased props generics
2015-09-17 20:11:06 +03:00
Daniel Rosenwasser
d333e3deb0
Add type annotation to avoid complaining about missing index signature in 'react'.
2015-08-20 16:53:36 -07:00
Daniel Rosenwasser
d2f69d40ab
Add index signature to 'ComponentSpec' in 'react'.
2015-08-20 14:32:32 -07: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
vvakame
523dc9d483
fix react/react-tests.ts and react/react-addons-tests.ts compile error
2015-04-15 23:23:21 +09:00
Vincent Siao
424bb99eac
Don't use DOM API interfaces for React.SVGAttributes
2015-03-14 16:15:59 -07:00
Vincent Siao
0213f7c10e
Fix state initializers in react-tests.ts ( Fixes #3855 )
2015-03-14 15:29:15 -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
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
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
db0333df59
React.Instance<P> -> React.ElementInstance<P>
2014-12-02 19:18:58 -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
Steve Baker
c7d900175e
add factory test
2014-11-13 20:25:46 +01:00
Steve Baker
fa6e45ea4c
allow calling component or element functions no arguments
2014-11-13 18:30:05 +01:00
Phips Peter
f547d80f49
Removed descriptors from our code
2014-10-17 16:24:11 -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
Josh Smith
e3382e45a7
Simple Test Components
2014-09-24 11:37:57 -07:00
Phips Peter
236a885f67
Fixing the tests
2014-09-23 16:04:18 -07:00
Phips Peter
26962dec65
Got props types to work
2014-09-23 15:47:06 -07:00