Skip to content

Commit d5155e7

Browse files
authored
Try and fix react ModernComponent test for TS 6.0, take 2 (DefinitelyTyped#74431)
1 parent e640ade commit d5155e7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

types/react/test/index.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,12 @@ class ModernComponent extends React.Component<Props, State, Snapshot> implements
139139

140140
constructor(props: Props, context: Context) {
141141
super(props, context);
142+
this.state = {
143+
inputValue: this.context.someValue,
144+
seconds: this.props.foo,
145+
};
142146
}
143147

144-
state = {
145-
inputValue: this.context.someValue,
146-
seconds: this.props.foo,
147-
};
148-
149148
reset() {
150149
this._myComponent.reset();
151150
this.setState({

0 commit comments

Comments
 (0)