Commit Graph

21 Commits

Author SHA1 Message Date
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
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