Commit Graph

29 Commits

Author SHA1 Message Date
Albert Kurniawan
f3527f0040 Updated Ref signature to handle null cases 2017-06-20 10:16:26 +10:00
Nathan Shively-Sanders
a575e086a2 Merge pull request #17224 from DefinitelyTyped/weak-type-errors-round-2
Fix primitive weak type errors
2017-06-15 17:33:16 -07:00
Mine Starks
7b4d7f7ed8 Merge pull request #17082 from rapilabs/react-invalid-event
react: Added InvalidEvent, onInvalid & onInvalidCapture
2017-06-15 12:47:45 -07:00
Nathan Shively-Sanders
4874667de9 Fix primitive weak type errors
These weak type errors were not caught in TS 2.4 RC. The final TS 2.4
will catch weak type errors with primitives, so this PR fixes those
now-caught errors.
2017-06-15 11:46:46 -07:00
Mine Starks
7ee78ab8b5 Merge pull request #16941 from dyst5422/patch-2
React: Add animateTransform SVG element to JSX.IntrinsicElements
2017-06-15 11:21:22 -07:00
David Sanders
8c19e8e886 Added InvalidEvent, onInvalid & onInvalidCapture
https://developer.mozilla.org/en-US/docs/Web/Events/invalid
2017-06-09 19:58:09 +10:00
Julien Roncaglia
18949a7319 Allow false as a result of React render()
`false` is treated the same as `null` when returned from `render()` in react but it wasn't allowed in the typings
2017-06-07 11:19:58 +02:00
Nathan Shively-Sanders
163f4438df Fix weak type errors (#16845)
* Fix first round of weak type errors

Done through griddle-react

* 95% done with weak type fixes

* Fix last couple of weak type errors

* Remove some lint from mithril tests

* mithril's Lifecycle is not a weak type any more

Restore the Lifecycle constraints in the rest of the definitions.

* Fix react-redux tests after #16652 broke them

* Remove package-lock.json
2017-06-04 22:03:03 -07:00
dyst5422
eeef424526 Add animateTransform SVG element to JSX.IntrinsicElements
The animateTransform SVG element was missing from JSX.IntrinsicElements.

Like the SVG animate element, this will need to be refined when  TypeScript's lib.dom.d.ts is updated to include SVGAnimateTransformElement.
2017-06-03 09:10:23 -07:00
Michael Elsdörfer
3b14b0a3a3 Add role and tabIndex back to SVGAttributes. (#16289)
Was removed as a part of https://github.com/DefinitelyTyped/DefinitelyTyped/pull/14618.
2017-06-01 08:04:49 -07:00
Cameron Little
5552b831b9 Update index.d.ts 2017-05-25 13:06:38 -07:00
Cameron Little
c34962bc59 Update index.d.ts 2017-05-25 09:29:01 -07:00
Cameron Little
bedfaf0249 Update index.d.ts 2017-05-24 09:40:34 -07:00
Cameron Little
a524192bf5 Add Component<P> class
This allows declaring a parameter or variable as a general "component with props P" instead of needing to declare it class based or function.
2017-05-24 09:34:25 -07:00
Nathan Shively-Sanders
43d74e2dfe Add a Component interface that merges w/the class
The Component interface extends ComponentLifecycle. ComponentLifecycle
goes back to being an interface.

Also fix some lint in react-virtualized
2017-05-24 09:15:22 -07:00
Nathan Shively-Sanders
dde2a7a3ba Change react's ComponentLifecycle to class
ComponentLifecycle is intended to provide some methods to Component
subclasses and enforce that overrides of those methods are correct in
those same subclasses.

However, it does neither of these things as an interface that
Component `implements`. It just checks that Component has all the
required methods of ComponentLifecycle. Since there are no required
methods, the `implements` check passes. And since Component doesn't
actually *implement* any of the methods, its subclasses don't get
them by default, and their 'overrides' are not checked for
correctness.

Changing ComponentLifecycle to a class fixes both of these problems.
2017-05-24 07:46:27 -07:00
Yui
13b5f660ba Include ElementChildrenAttribute
This is a new feature in 2.3 as TypeScript will be able to check JSX.children
2017-05-04 14:04:25 -07:00
Jane Chu
4854ed7cb5 fix(react): add cite attribute 2017-04-24 15:14:20 -07:00
Philip Jackson
940b36aea4 React: Use specific event type for nativeEvent property (#15610)
* Use specific event type for nativeEvent property

Allows event handlers to fully use the `ev.nativeEvent` property without casting. But it does make the `React.MouseEvent` type slightly more complicated.

* Maintain backwards compatibility of SyntheticEvent type

TypeScript 2.3 should be adding type parameter defaults, which allows the `nativeEvent` property to be made generic but without breaking existing code.

* Override nativeEvent in the more specific event types

Overriding nativeEvent in this way maintains backwards compatibility and doesn't depend on bleeding-edge TypeScript features.
2017-04-17 09:08:50 -07:00
Wayne Dela Cruz
e4c860c1ba React specific typings for css position (#15575)
* React CSSProperties position made specific

* Add test for css position
2017-04-17 08:34:07 -07:00
Andy Hanson
d58e6ecce5 Merge branch 'cleanup-react-readme' of https://github.com/ericanderson/DefinitelyTyped into ericanderson-cleanup-react-readme 2017-04-17 08:15:55 -07:00
Dovydas Navickas
9e35640e2d Update README.md 2017-04-08 22:56:07 +03:00
Eric Anderson
68094fa835 Add myself as an author for react 2017-03-31 09:11:31 -04:00
Eric Anderson
2950b6bbe7 Remove old warnings in react readme 2017-03-31 09:00:17 -04:00
Wayne Dela Cruz
a3b39389cd react use TS 2.2 2017-03-31 09:45:49 +08:00
Wayne Dela Cruz
7ca4941d99 Use double quotes instead of single quotes 2017-03-30 19:55:26 +08:00
Wayne Dela Cruz
6f8a10f1a1 Wrote tests for css overflow props 2017-03-28 21:12:19 +08:00
Wayne Dela Cruz
51fda94d04 Add specific typings to css overflow props
CSS overflows are any one of the ff. auto, hidden, scroll, visible

Applied those to overflow, overlowX, and overflowY
2017-03-28 21:10:03 +08:00
Andy Hanson
354cec620d Move all packages to a types directory 2017-03-24 14:27:52 -07:00