Fix rest operator syntax errors

Summary:
These are caused by new [syntax checking](1285131e3e/CHANGELOG.md (v6113-2016-10-01)) introduced by babylon.

"The single rest at the end only applies to binding `let { x, ...y } = obj;` and assignment `({ x, ...y } = obj).`"

I'd say this really should be cherry picked into the stable branch.

**Test plan**
1. install babylon@6.11.3
2. see that things break
3. apply patch
4. things work
5. make sure all instances were fixed (I used `\.\.\..*,.*\n.*=` in IntelliJ regex format—find all ... followed by newline followed by =)

Issue #10199
Closes https://github.com/facebook/react-native/pull/10200

Differential Revision: D3974066

Pulled By: javache

fbshipit-source-id: 3f3c1e9df01a3b3bdd61dd3863416c638d3ed98d
This commit is contained in:
Michał Łazowik 2016-10-05 04:41:32 -07:00 коммит произвёл Facebook Github Bot
Родитель 1941450649
Коммит f77185f27e
3 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -108,7 +108,7 @@ function arrayContains<T>(array: Array<T>, value: T): boolean {
function createErrorFromErrorData(errorData: {message: string}): Error {
const {
message,
...extraErrorInfo,
...extraErrorInfo
} = errorData;
const error = new Error(message);
(error:any).framesToPop = 1;

Просмотреть файл

@ -454,7 +454,7 @@ var ListView = React.createClass({
var {
renderScrollComponent,
...props,
...props
} = this.props;
if (!props.scrollEventThrottle) {
props.scrollEventThrottle = DEFAULT_SCROLL_CALLBACK_THROTTLE;

Просмотреть файл

@ -82,7 +82,7 @@ class NavigationCard extends React.Component<any, Props, any> {
pointerEvents,
renderScene,
style,
...props, /* NavigationSceneRendererProps */
...props /* NavigationSceneRendererProps */
} = this.props;
const viewStyle = style === undefined ?