Commit Graph

200 Commits

Author SHA1 Message Date
Ryan Cavanaugh
a5f4d50ccc Fix tsconfig files for new option name / behavior.
Also fixes some inconsistent whitespace.
2016-07-12 13:54:56 -07:00
phiresky
084926e23a
react: Add target type to events
this allows getting the actual html element type from events.

Example:

```ts
render() {
    return <input onChange={e => console.log(e.target.value)}/>
}
```

Previously you would have to cast the target manually:
```ts
render() {
    return <input onChange={e => console.log((e.target as
    HTMLInputElement).value)}/>
}
```
2016-07-03 20:23:20 +02:00
Raghav Katyal
395c4e1639 Turning on consistent casing flag and fixing failures 2016-06-30 15:14:49 -07:00
Ryan Cavanaugh
cdf9aa4e1d Convert react-router 2016-05-11 16:33:19 -07:00
Ryan Cavanaugh
72a319137e Split out react addons 2016-05-11 16:32:53 -07:00
Ryan Cavanaugh
185c8f30b6 Fix more reference paths 2016-05-11 16:31:46 -07:00
Ryan Cavanaugh
e105eabd48 Remove invalid references 2016-05-10 16:27:59 -07:00
Ryan Cavanaugh
612c172c52 Use correct test list 2016-05-10 12:28:03 -07:00
Ryan Cavanaugh
bfd400a8f8 Add noEmit to all config files 2016-05-10 12:24:49 -07:00
Ryan Cavanaugh
e808e8e062 Remove unneeded references 2016-05-10 12:22:25 -07:00
Ryan Cavanaugh
50387d4046 Change relative reference paths to types references. Errors incoming... 2016-05-09 18:06:27 -07:00
Ryan Cavanaugh
49b1ac6a38 Rename all entry points to index.d.ts and explicitify all file lists 2016-05-09 17:29:10 -07:00
Ryan Cavanaugh
ab2b4191c5 Add typesRoot to all config files 2016-05-09 13:52:25 -07:00
Ryan Cavanaugh
33686b47c5 Lots of fixes 2016-05-04 16:30:29 -07:00
Ryan Cavanaugh
ded70421be Turn off strict null checks 2016-05-04 15:08:38 -07:00
Ryan Cavanaugh
69d1929d8a Add tsconfig.json files 2016-05-04 14:14:39 -07:00
Ryan Cavanaugh
e7c111c4b7 Merge remote-tracking branch 'upstream/master' into types2.0
Add tsconfig files everywhere

# Conflicts:
#	azure-mobile-services-client/AzureMobileServicesClient.d.ts
#	bookshelf/bookshelf.d.ts
#	hapi/hapi.d.ts
#	helmet/helmet.d.ts
#	mongodb/mongodb.d.ts
#	nock/nock.d.ts
#	react-bootstrap/react-bootstrap.d.ts
#	react-helmet/react-helmet.d.ts
#	restify/restify.d.ts
#	sequelize/sequelize.d.ts
2016-04-27 20:40:21 -07: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
Long Lazuli
3a44f976ba Update React - Adds SVG <use> & <symbol> to the JSX IntrinsicElements (#9012)
* Adds SVG USE & SYMBOL to the JSX IntrinsicElements

* Reverse ReactDom changes
2016-04-23 15:59:14 +09:00
Yiting Zhi 支一婷
a3640e13de [React] exported copy event simulator for testing (#8992) 2016-04-17 23:49:49 +09:00
François Guillot
f9b6faf87c Add missing property className. (#8965) 2016-04-17 22:41:18 +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
Masahiro Wakame
ecaf8c1c3f Merge pull request #8607 from waywardmonkeys/fix-typos
react: Fix typo in comment.
2016-03-19 14:34:54 +09:00
vvakame
7de6c3dd94 Merge branch 'master' into rename-repo-url 2016-03-17 21:06:54 +09:00
Bruce Mitchener
1226b59d6e react: Fix typo in comment. 2016-03-17 18:12:35 +07:00
vvakame
14fe4313f4 replace internal module to namespace 2016-03-17 02:18:10 +09:00
vvakame
56295f5058 replace https://github.com/borisyankov/DefinitelyTyped to https://github.com/DefinitelyTyped/DefinitelyTyped 2016-03-17 00:55:26 +09:00
Vincent Siao
6b2cbaed75 [react] update README with known problems & workarounds 2016-03-14 02:05:24 -07:00
Vincent Siao
648a4b27b9 [react] add nonce and reversed to HTMLAttributes 2016-03-14 02:05:24 -07: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
Daniel Rosenwasser
945ebfe049 Merge pull request #8284 from Asana/react-fixes
React updates (improved cloneElement & TestUtils return-type inference)
2016-03-02 14:44:48 -08:00
Vincent Siao
1c27f2429e [react] Reorganize CSSProperties; add missing properties 2016-03-01 02:21:54 -08: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
60ea35043d [react] Add React.Key; React.Ref<T> types 2016-02-26 14:00:12 -08:00
glatzert
744a89c4b1 Updated interface HTMLAttributes
The explicit form of the indexer `[key: string]: string | string[] | boolean | number | EventHandler<SyntheticEvent> | CSSProperties | {__html: string};` Fails in TravisCI - so any is currently the way to go.
2016-02-25 10:28:51 +01:00
glatzert
e72758e8b7 Updated HTMLAttributes to support data- and aria- more spceifically
The HTMLAttribute was updated to Support data-* and aria-* Attributes. Since `any` is possibly to broad, the Definition allows any type used in HTMLAttributes and DOMAttributes.
2016-02-25 09:43:59 +01:00
glatzert
443f5a9e39 Updated interface HTMLAttributes
Added [key:string]: any; to HTMLAttributes to Support data- and aria- Attributes, which are unsupported currently.
2016-02-24 16:51:17 +01:00
Tom Duncalf
f407264835 Add missing hgroup element to react.d.ts 2016-02-09 11:08:09 +00:00
sjef
83b88a031c Added missing bottom property in React.CSSProperties 2016-02-05 13:14:37 +01:00
Alex Thompson
e3a7583dc3 CSSProperties missing backgroundColor 2016-01-29 10:33:36 -08:00
Masahiro Wakame
69b3c5934b Merge pull request #7123 from Asana/react-14-fix
[React] Add SFC displayName and fix onlyChild type
2016-01-29 12:38:35 +09:00
Bernie Sumption
69154f67ee Added the clipPath SVG element
Not sure when it was added, but the current version of react supports the clipPath element: http://facebook.github.io/react/docs/tags-and-attributes.html
2016-01-25 17:38:46 +00:00
Jason Jarrett
2cad4a3cff small change to force an update (testing NugetAutomation) 2016-01-21 09:27:28 -08:00
Roger Chen
0315ce5497 Remove extra whitespace from react-addons-transition-group 2016-01-06 08:16:37 -08:00
Jasper Patterson
8b2be7dbb2 Changed autoCapitalize attribute from boolean to string 2015-12-27 20:46:15 -07:00
Anton Ulyanov
fd5229673a Added min-height css property to react definitions 2015-12-24 10:12:30 +02:00