Skip to content
This repository was archived by the owner on Sep 21, 2019. It is now read-only.

Commit eaa518d

Browse files
committed
update test output
1 parent adc4eae commit eaa518d

File tree

25 files changed

+35
-59
lines changed

25 files changed

+35
-59
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
type Foo = {};
1+
type Foo = {
2+
};
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
type Foo = {
22
foo: string;
33
bar: number;
4-
};
4+
};

test/end-to-end/basic/output.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import * as React from 'react';
2-
3-
type MyComponentProps = {};
4-
type MyComponentState = {};
5-
2+
type MyComponentProps = {
3+
};
4+
type MyComponentState = {
5+
};
66
export default class MyComponent extends React.Component<MyComponentProps, MyComponentState> {
77
render() {
88
return <div />;

test/end-to-end/initial-state-and-proprypes-and-set-state/output.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as React from 'react';
2-
32
type MyComponentProps = {
43
baz: string;
54
};

test/end-to-end/initial-state-and-proprypes/output.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as React from 'react';
2-
32
type MyComponentProps = {
43
baz: string;
54
};

test/end-to-end/non-react/output.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ class Foo {
66
class Bar extends Foo {
77
baz() {
88
}
9-
}
9+
}
Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
interface IFoo {
2-
32
}
43
class Foo {
5-
64
}
7-
85
class Bar extends Foo {
9-
106
}
11-
127
class Foo2 implements IFoo {
13-
148
}
15-
169
class Bar2 extends Foo implements IFoo {
17-
1810
}

test/react-hoist-generics-transform/propless-stateless/output.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import * as React from 'react';
2-
3-
type MyComponentProps = {};
4-
type MyComponentState = {};
2+
type MyComponentProps = {
3+
};
4+
type MyComponentState = {
5+
};
56
export default class MyComponent extends React.Component<MyComponentProps, MyComponentState> {
67
render() {
78
return <div />;

test/react-hoist-generics-transform/props-and-state/output.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as React from 'react';
2-
32
type MyComponentProps = {
43
foo: string;
54
bar: object;
Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
interface IFoo {
2-
32
}
43
class Foo {
5-
64
}
7-
85
class Bar extends Foo {
9-
106
}
11-
127
class Foo2 implements IFoo {
13-
148
}
15-
169
class Bar2 extends Foo implements IFoo {
17-
1810
}

test/react-js-make-props-and-state-transform/propless-stateless/output.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as React from 'react';
2-
3-
export default class MyComponent extends React.Component<{}, {}> {
2+
export default class MyComponent extends React.Component<{
3+
}, {
4+
}> {
45
render() {
56
return <div />;
67
}

test/react-js-make-props-and-state-transform/set-state-advanced/output.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
11
import * as React from 'react';
2-
3-
export default class MyComponent extends React.Component<{}, { foo: number; bar: number; } & { baz: number; } & { something: { big: number; here: string; of: { a: number; }[]; }; }> {
2+
export default class MyComponent extends React.Component<{
3+
}, { foo: number; bar: number; } & { baz: number; } & { something: { big: number; here: string; of: { a: number; }[]; }; }> {
44
render() {
55
return <button onClick={this.onclick.bind(this)}/>;
66
}
7-
87
onclick() {
98
if (Math.random() > 0.5) {
109
this.setState({ foo: 1, bar: 2 });
1110
}
1211
this.otherMethod();
1312
}
14-
1513
otherMethod() {
1614
for (const foo of [1, 2, 3]) {
1715
if (foo > 2) {
1816
this.setState({ baz: foo });
1917
}
2018
}
2119
}
22-
2320
addLargeObjectToState() {
2421
this.setState({
2522
something: {

test/react-js-make-props-and-state-transform/set-state-only/output.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import * as React from 'react';
2-
3-
export default class MyComponent extends React.Component<{}, { foo: number; bar: number; }> {
2+
export default class MyComponent extends React.Component<{
3+
}, { foo: number; bar: number; }> {
44
render() {
55
return <button onClick={this.onclick.bind(this)}/>;
66
}
7-
87
onclick() {
98
this.setState({ foo: 1, bar: 2 });
109
}

test/react-js-make-props-and-state-transform/state-in-class-member/output.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
2-
3-
export default class MyComponent extends React.Component<{}, { foo: number; }> {
2+
export default class MyComponent extends React.Component<{
3+
}, { foo: number; }> {
44
state = { foo: 1 };
55
render() {
66
return <div />;

test/react-js-make-props-and-state-transform/state-in-constructor/output.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import * as React from 'react';
2-
3-
export default class MyComponent extends React.Component<{}, { foo: number; }> {
2+
export default class MyComponent extends React.Component<{
3+
}, { foo: number; }> {
44
constructor(props, context) {
55
super(props, context);
66
this.state = { foo: 1 };
77
}
8-
98
render() {
109
return <div />;
1110
}

test/react-js-make-props-and-state-transform/static-proptypes-getter-simple/output.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import * as React from 'react';
2-
32
export default class MyComponent extends React.Component<{
43
foo: string;
5-
}, {}> {
4+
}, {
5+
}> {
66
static get propTypes() {
77
return {
88
foo: React.PropTypes.string.isRequired,

test/react-js-make-props-and-state-transform/static-proptypes-many-props/output.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as React from 'react';
2-
32
export default class MyComponent extends React.Component<{
43
any?: any;
54
array?: any[];
@@ -19,7 +18,8 @@ export default class MyComponent extends React.Component<{
1918
stringRequired: string;
2019
nodeRequired: React.ReactNode;
2120
elementRequired: JSX.Element;
22-
}, {}> {
21+
}, {
22+
}> {
2323
static propTypes = {
2424
children: React.PropTypes.node,
2525
any: React.PropTypes.any,

test/react-js-make-props-and-state-transform/static-proptypes-simple/output.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import * as React from 'react';
2-
32
export default class MyComponent extends React.Component<{
43
foo: string;
5-
}, {}> {
4+
}, {
5+
}> {
66
static propTypes = {
77
foo: React.PropTypes.string.isRequired,
88
};

test/react-move-prop-types-to-class-transform/simple/output.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@ class SomeComponent extends React.Component<{
88
return null;
99
}
1010
}
11-
12-
SomeComponent.propTypes = { foo: React.PropTypes.string };
11+
SomeComponent.propTypes = { foo: React.PropTypes.string };
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
import * as React from 'react';
2-
32
function Foo() {
4-
53
}

test/react-remove-prop-types-assignment-transform/multiple/output.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ class SomeComponent extends React.Component<{
33
}, {
44
bar: string;
55
}> {
6-
}
6+
}

test/react-remove-prop-types-assignment-transform/simple/output.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ class SomeComponent extends React.Component<{
33
}, {
44
bar: string;
55
}> {
6-
}
6+
}

test/react-remove-static-prop-types-member-transform/getter/output.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ class SomeComponent extends React.Component<{
33
}, {
44
bar: string;
55
}> {
6-
}
6+
}

test/react-remove-static-prop-types-member-transform/multiple/output.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ class SomeComponent extends React.Component<{
33
}, {
44
bar: string;
55
}> {
6-
}
6+
}

test/react-remove-static-prop-types-member-transform/simple/output.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ class SomeComponent extends React.Component<{
33
}, {
44
bar: string;
55
}> {
6-
}
6+
}

0 commit comments

Comments
 (0)