Commit Graph

249 Commits

Author SHA1 Message Date
zhengbli
c2a54db3e9 Merge branch 'master' into types-2.0
# Conflicts:
#	amcharts/AmCharts.d.ts
#	angular-gettext/angular-gettext.d.ts
#	angular-jwt/angular-jwt.d.ts
#	angular-material/angular-material.d.ts
#	angularjs/angular.d.ts
#	auth0-js/auth0-js.d.ts
#	aws-lambda/aws-lambda.d.ts
#	aws-sdk/aws-sdk.d.ts
#	azure-mobile-apps/azure-mobile-apps.d.ts
#	azure-mobile-services-client/AzureMobileServicesClient.d.ts
#	blessed/blessed-tests.ts
#	blessed/blessed.d.ts
#	bootbox/bootbox.d.ts
#	bowser/bowser.d.ts
#	cache-manager/cache-manager.d.ts
#	chai-things/chai-things.d.ts
#	colors/colors.d.ts
#	cordova/cordova-tests.ts
#	cordova/plugins/Contacts.d.ts
#	cordova/plugins/FileSystem.d.ts
#	couchbase/couchbase.d.ts
#	cucumber/cucumber-tests.ts
#	cucumber/cucumber.d.ts
#	d3/d3.d.ts
#	dojo/dojo.d.ts
#	dustjs-linkedin/dustjs-linkedin.d.ts
#	esprima/esprima.d.ts
#	express-serve-static-core/express-serve-static-core.d.ts
#	express-session/express-session.d.ts
#	fetch-mock/fetch-mock.d.ts
#	fs-extra/fs-extra.d.ts
#	fullCalendar/fullCalendar.d.ts
#	github-electron/github-electron.d.ts
#	gulp-uglify/gulp-uglify.d.ts
#	gulp/gulp.d.ts
#	highcharts/highcharts.d.ts
#	imap/imap.d.ts
#	incremental-dom/incremental-dom.d.ts
#	inversify/inversify.d.ts
#	ionic/ionic.d.ts
#	ioredis/ioredis.d.ts
#	isomorphic-fetch/isomorphic-fetch-tests.ts
#	jake/jake.d.ts
#	joi/joi.d.ts
#	jquery-mockjax/jquery-mockjax.d.ts
#	jquery/jquery.d.ts
#	js-data-http/js-data-http-tests.ts
#	js-data-http/js-data-http.d.ts
#	js-data/js-data.d.ts
#	jsdom/jsdom.d.ts
#	jsts/jsts-tests.ts
#	knex/knex.d.ts
#	koa-favicon/koa-favicon.d.ts
#	koa-router/koa-router-tests.ts
#	koa-router/koa-router.d.ts
#	lodash/lodash.d.ts
#	mailparser/mailparser.d.ts
#	maquette/maquette.d.ts
#	material-ui/material-ui.d.ts
#	matter-js/matter-js.d.ts
#	moment/moment.d.ts
#	mongoose-promise/mongoose-promise-tests.ts
#	mongoose/mongoose-tests.ts
#	mongoose/mongoose.d.ts
#	multer/multer.d.ts
#	ncp/ncp.d.ts
#	nock/nock.d.ts
#	node/node-tests.ts
#	node/node.d.ts
#	nvd3/nvd3.d.ts
#	object-assign/object-assign.d.ts
#	openlayers/openlayers.d.ts
#	parse/parse.d.ts
#	pdf/pdf.d.ts
#	pdfkit/pdfkit.d.ts
#	pg/pg.d.ts
#	pixi.js/pixi.js.d.ts
#	progress/progress.d.ts
#	pusher-js/pusher-js.d.ts
#	quill/quill-tests.ts
#	quill/quill.d.ts
#	radium/radium.d.ts
#	ravenjs/ravenjs-tests.ts
#	react-dropzone/react-dropzone.d.ts
#	react-mdl/react-mdl.d.ts
#	react-native/react-native.d.ts
#	react-notification-system/react-notification-system.d.ts
#	react-router/history-tests.ts
#	react-router/react-router-tests.tsx
#	react-router/react-router.d.ts
#	react-select/react-select-tests.tsx
#	react-select/react-select.d.ts
#	react/react.d.ts
#	redux-form/redux-form.d.ts
#	request-promise/request-promise.d.ts
#	resolve-from/resolve-from.d.ts
#	riot-api-nodejs/riot-api-nodejs.d.ts
#	sanitize-html/sanitize-html.d.ts
#	segment-analytics/segment-analytics.d.ts
#	simple-assign/simple-assign-tests.ts
#	simple-assign/simple-assign.d.ts
#	slate-irc/slate-irc.d.ts
#	soap/soap.d.ts
#	socket.io/socket.io.d.ts
#	sql.js/sql.js-tests.ts
#	sql.js/sql.js.d.ts
#	steam/steam.d.ts
#	stylus/stylus.d.ts
#	swiper/swiper.d.ts
#	tedious/tedious.d.ts
#	threejs/three.d.ts
#	twilio/twilio.d.ts
#	underscore/underscore.d.ts
#	ws/ws.d.ts
#	yeoman-generator/yeoman-generator.d.ts
2016-09-14 18:44:24 -07:00
Josh Abernathy
a13fa7abf5 Make React's SyntheticEvent.currentTarget generic over T again (#10784)
* Make SyntheticEvent.target generic over T again

This change was added in 084926e23a but then reverted in 5607f54def. The revert _looks_ like an accident to me, as it's a merge coming in from master vs. a purposeful change. Maybe it got accidentally stepped on in resolving a conflict?

If `target` should no longer be the intersection of `EventTarget` and `T`, then there's not much point to `SyntheticEvent` being generic over `T`.

* Make `currentTarget` generic over instead instead of `target`
2016-09-06 23:01:03 +09:00
Clay Miller
327d35fb7a
Remove icon from React.HTMLAttributes (fixes #10467) 2016-08-29 12:10:40 -07:00
Paul van Brenk
389c99a47f fix react 2016-08-19 13:40:17 -07:00
Paul van Brenk
5c77befaaa fix break 2016-08-19 10:53:44 -07:00
Paul van Brenk
2a10e28ad4 New typings migrated to 2.0 2016-08-18 16:39:16 -07:00
Paul van Brenk
5607f54def Merge master into typings-2.0
* Changed Files
2016-08-18 14:53:30 -07:00
Paul van Brenk
f9117cf5dd Merge pull request #10421 from Nitive/patch-1
Fix StatelessComponent interface
2016-08-17 13:12:27 -07:00
Ivo Stratev
d72a787f0d Update react.d.ts 2016-08-17 10:06:23 +03:00
Maxim Samoilov
f1c88a8096 test(react): add strictNullChecks test #10421 2016-08-17 13:26:02 +07:00
Benoit Bénézech
32e719c701 Update index.d.ts
Fixes 

```bash
client/components/controllers/Notes.tsx(199,13): error TS2605: JSX element type 'Component<OwnProps, {} | void>' is not a constructor function for JSX elements.
  Types of property 'render' are incompatible.
    Type '() => Element | null' is not assignable to type '() => Element'.
      Type 'Element | null' is not assignable to type 'Element'.
        Type 'null' is not assignable to type 'Element'.
```

rendering `null` is acceptable and should be accepted.

See https://github.com/Microsoft/TypeScript/issues/10259
2016-08-13 20:45:26 +02:00
Ivo Stratev
b5b1fd2826 Adding missing methods from SyntheticEvent 2016-08-13 18:38:52 +03:00
Mine Yalcinalp Starks
29e75d32e1 Merge remote-tracking branch 'upstream/master' into types2.0-fix 2016-08-05 17:32:30 -07:00
Ivo Stratev
edcbaabb56 Adding missing method persist from SyntheticEvent 2016-08-05 15:55:51 +03:00
Mine Yalcinalp Starks
8252b2118a Merge remote-tracking branch 'upstream/master' into minestarks-types2.0 2016-08-03 15:19:03 -07:00
Rand Scullard
613673de36 react: Add all remaining SVG elements except deprecated ones. 2016-08-02 15:15:55 -04:00
Maxim Samoilov
c80a022263 Fix StatelessComponent interface
Props always pass to StatelessComponent even if we pass no props.
Example:

```js
function Test(props) {
  return <div>props: {JSON.stringify(props)}</div>
}

React.render(<Test />, document.body)
```
will render into `props: {}`
[jsfiddle](https://jsfiddle.net/LL25c28c/)

We need to fix this because otherwise we have error:
`Property 'propName' does not exist on type 'IntrinsicAttributes & (IMyInterface | undefined)'.`
for that code:
```js
const MyComponent: React.SFC<IMyInterface> = ({ propName }: IMyInterface) => {
  // ...
}
```
2016-08-02 20:25:07 +07:00
Mine Starks
1fcd5cc4bd Merge pull request #10377 from Kovensky/patch-1
Add PureComponent definition (React 15.3)
2016-08-01 13:31:55 -07:00
Rand Scullard
8c0b431766 react: Add SVG elements feFuncA and textPath. 2016-07-30 11:33:20 -04:00
Diogo Franco
1837f78bed Add PureComponent definition (React 15.3)
Observably, it's identical to a Component, just with a default invisible shouldComponentUpdate.
2016-07-30 21:42:25 +09:00
Kanchalai Tanglertsampan
fd2eae1d07 Merge branch 'types-2.0' into RyanCavanaugh-merge_7_25 2016-07-28 09:06:45 -07:00
Donald Pipowitch
c81989770f Update index.d.ts
Support strict null checks in TypeScript 2.0.
2016-07-28 07:40:38 +02:00
Ryan Cavanaugh
29ba4b7a42 Get tests passing again 2016-07-27 20:45:08 -07:00
Ryan Cavanaugh
ca19fab9cf Merge remote-tracking branch 'upstream/types-2.0' into merge_7_25 2016-07-27 16:13:04 -07:00
Ryan Cavanaugh
b488f3cb5f Merge remote-tracking branch 'upstream/master' into merge_7_25 2016-07-27 10:57:46 -07:00
Ryan Cavanaugh
c33a46c3d5 Merge commit 'upstream/master~200' into merge_7_25 2016-07-26 18:25:24 -07:00
Ryan Cavanaugh
b9245fba39 Merge commit 'upstream/master~350' into merge_7_25 2016-07-26 17:24:39 -07:00
Ryan Cavanaugh
c73630c9a3 Merge commit 'upstream/master~400' into merge_7_25
# Conflicts:
#	angular-translate/angular-translate.d.ts
#	knex/knex.d.ts
#	redux-logger/index.d.ts
#	simplestorage.js/index.d.ts
#	underscore/underscore.d.ts
#	yargs/yargs.d.ts
2016-07-26 13:53:00 -07:00
Ryan Cavanaugh
e94e9a8630 Merge commit 'upstream/master~450' into merge_7_25 2016-07-26 13:40:56 -07:00
Daniel Rosenwasser
a3ce89b0d3 Remove string index signature. 2016-07-26 12:35:37 -07:00
Ryan Cavanaugh
ede3f0a99c Merge commit 'upstream/master~550' into merge_7_25 2016-07-26 11:29:27 -07:00
Ryan Cavanaugh
5d004be8ba Merge commit 'upstream/master~600' into merge_7_25 2016-07-26 00:22:12 -07:00
Stevi Deter
c34251f96b Types 2.0 ReactDom.render (#10206)
* For ReactDOM.render, make element parameter nullable to match React API and match Typescript 2.0 definition for Document.getElementById

* one more test
2016-07-23 23:38:28 -07:00
rdeline
03cd162da0 Add marker to IntrinsicElements (#10173) 2016-07-19 23:04:42 -07:00
Ryan Cavanaugh
9d7d5a209a Getting types-2.0 passing CI 2016-07-14 18:13:43 -07:00
Ryan Cavanaugh
a5f4d50ccc Fix tsconfig files for new option name / behavior.
Also fixes some inconsistent whitespace.
2016-07-12 13:54:56 -07:00
Alexey Svetliakov
6a36f6d5b6 Allow es6 import for addons-create-fragment/addons-shallow-compare 2016-07-09 06:46:14 +02: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
Ryan Cavanaugh
925dbd5230 Merge pull request #8753 from jwbay/react-transition-group-props
TransitionGroup spreads HTMLAttribute props onto its component
2016-06-30 17:13:52 -07:00
Raghav Katyal
395c4e1639 Turning on consistent casing flag and fixing failures 2016-06-30 15:14:49 -07:00
Ryan Cavanaugh
3fa452ae11 Merge pull request #9895 from wingyplus/rename-argument-and-remove-whitespace
react: rename argument and remove trailing whitespace
2016-06-30 11:36:51 -07:00
Thanabodee Charoenpiriyakij
9a062b06b6 react: fix duplicate statelessElement in react-tests.ts 2016-06-30 17:31:54 +07:00
Thanabodee Charoenpiriyakij
4020976848 react: rename argument and remove trailing whitespace
`callBack` name not match the convention it should change
to `callback`
2016-06-30 17:07:02 +07:00
Mohamed Hegazy
59260ed058 Merge pull request #9258 from lijunle/patch-1
The DragEvent should inherit from MouseEvent.
2016-06-21 15:56:15 -07:00
Alex Pyzhianov
f526787747 React: add SVG flters to JSX Elements 2016-06-21 14:41:44 +03:00
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
Alex Pyzhianov
e3df7a21b9 react.d.ts: add <foreignObject/> to JSX (#9523) 2016-06-03 00:15:22 +09:00
Rand Scullard
e76f4c9798 react: Add animation and transition events from React 15. (#9443) 2016-06-02 23:03:09 +09:00
Roman Würsch
d4ab7731d3 WheelEvent extends MouseEvent not SyntheticEvent (#9437) 2016-06-02 21:51:06 +09:00
Jan-Pieter Zoutewelle
dc619d01b2 Added the version of React to the typing. (#9429)
* Added version to React typings

* Update react.d.ts
2016-05-26 22:46:01 +09:00