Skip to content

Commit 8553e1a

Browse files
gkzfacebook-github-bot
authored andcommitted
Exact-by-default codemod for react-native-github
Summary: We are rolling out exact-by-default syntax to xplat/js. I had to manually move around some comments to preserve proper placement. Changelog: [Internal] Reviewed By: jbrown215 Differential Revision: D18633611 fbshipit-source-id: 48f7468dcc55b1d00985419d035a61c6820b3abe
1 parent 1ad0862 commit 8553e1a

205 files changed

Lines changed: 879 additions & 379 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

IntegrationTests/AccessibilityManagerTest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const {TestModule} = ReactNative.NativeModules;
1818
import NativeAccessibilityManager from 'react-native/Libraries/Components/AccessibilityInfo/NativeAccessibilityManager';
1919
import invariant from 'invariant';
2020

21-
class AccessibilityManagerTest extends React.Component<{}> {
21+
class AccessibilityManagerTest extends React.Component<{...}> {
2222
componentDidMount() {
2323
invariant(
2424
NativeAccessibilityManager,

IntegrationTests/AppEventsTest.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,19 @@ const deepDiffer = require('react-native/Libraries/Utilities/differ/deepDiffer')
1919

2020
const TEST_PAYLOAD = {foo: 'bar'};
2121

22-
type AppEvent = {data: Object, ts: number};
22+
type AppEvent = {
23+
data: Object,
24+
ts: number,
25+
...
26+
};
2327
type State = {
2428
sent: 'none' | AppEvent,
2529
received: 'none' | AppEvent,
2630
elapsed?: string,
31+
...
2732
};
2833

29-
class AppEventsTest extends React.Component<{}, State> {
34+
class AppEventsTest extends React.Component<{...}, State> {
3035
state: State = {sent: 'none', received: 'none'};
3136

3237
componentDidMount() {

IntegrationTests/AsyncStorageTest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ function testOptimizedMultiGet() {
171171
});
172172
}
173173

174-
class AsyncStorageTest extends React.Component<{}, $FlowFixMeState> {
174+
class AsyncStorageTest extends React.Component<{...}, $FlowFixMeState> {
175175
state: any | {|done: boolean, messages: string|} = {
176176
messages: 'Initializing...',
177177
done: false,

IntegrationTests/GlobalEvalWithSourceUrlTest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const {View} = ReactNative;
1717

1818
const {TestModule} = ReactNative.NativeModules;
1919

20-
class GlobalEvalWithSourceUrlTest extends React.Component<{}> {
20+
class GlobalEvalWithSourceUrlTest extends React.Component<{...}> {
2121
componentDidMount() {
2222
if (typeof global.globalEvalWithSourceUrl !== 'function') {
2323
throw new Error(

IntegrationTests/ImageCachePolicyTest.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ const {TestModule} = ReactNative.NativeModules;
2727

2828
const TESTS = ['only-if-cached', 'default', 'reload', 'force-cache'];
2929

30-
type Props = {};
30+
type Props = {...};
3131
type State = {
3232
'only-if-cached'?: boolean,
3333
default?: boolean,
3434
reload?: boolean,
3535
'force-cache'?: boolean,
36+
...
3637
};
3738

3839
class ImageCachePolicyTest extends React.Component<Props, $FlowFixMeState> {

IntegrationTests/ImageSnapshotTest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const ReactNative = require('react-native');
1515
const {Image} = ReactNative;
1616
const {TestModule} = ReactNative.NativeModules;
1717

18-
class ImageSnapshotTest extends React.Component<{}> {
18+
class ImageSnapshotTest extends React.Component<{...}> {
1919
componentDidMount() {
2020
if (!TestModule.verifySnapshot) {
2121
throw new Error('TestModule.verifySnapshot not defined.');

IntegrationTests/IntegrationTestsApp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ require('./LoggingTestModule');
5151

5252
type Test = any;
5353

54-
class IntegrationTestsApp extends React.Component<{}, $FlowFixMeState> {
54+
class IntegrationTestsApp extends React.Component<{...}, $FlowFixMeState> {
5555
state = {
5656
test: (null: ?Test),
5757
};

IntegrationTests/LayoutEventsTest.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ type State = {
3838
viewLayout?: Layout,
3939
viewStyle?: ViewStyleProp,
4040
containerStyle?: ViewStyleProp,
41+
...
4142
};
4243

4344
class LayoutEventsTest extends React.Component<Props, State> {

IntegrationTests/PromiseTest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const ReactNative = require('react-native');
1515
const {View} = ReactNative;
1616
const {TestModule} = ReactNative.NativeModules;
1717

18-
class PromiseTest extends React.Component<{}> {
18+
class PromiseTest extends React.Component<{...}> {
1919
shouldResolve: boolean = false;
2020
shouldReject: boolean = false;
2121
shouldSucceedAsync: boolean = false;

IntegrationTests/SimpleSnapshotTest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const requestAnimationFrame = require('fbjs/lib/requestAnimationFrame');
1818
const {StyleSheet, View} = ReactNative;
1919
const {TestModule} = ReactNative.NativeModules;
2020

21-
class SimpleSnapshotTest extends React.Component<{}> {
21+
class SimpleSnapshotTest extends React.Component<{...}> {
2222
componentDidMount() {
2323
if (!TestModule.verifySnapshot) {
2424
throw new Error('TestModule.verifySnapshot not defined.');

0 commit comments

Comments
 (0)