質問編集履歴
1
最新のコードを追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -129,3 +129,51 @@
|
|
129
129
|
(4,18): An empty interface is equivalent to `{}`.
|
130
130
|
|
131
131
|
```
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
最新のコード
|
136
|
+
|
137
|
+
```typescript
|
138
|
+
|
139
|
+
import * as React from "react";
|
140
|
+
|
141
|
+
import "./App.css";
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
//export interface IProps {}
|
146
|
+
|
147
|
+
export interface IState {
|
148
|
+
|
149
|
+
income: string;
|
150
|
+
|
151
|
+
}
|
152
|
+
|
153
|
+
const logo = require("./logo.svg");
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
class App extends React.Component<{}, IState> {
|
158
|
+
|
159
|
+
constructor(props) {
|
160
|
+
|
161
|
+
super(props);
|
162
|
+
|
163
|
+
this.state = {
|
164
|
+
|
165
|
+
income: ""
|
166
|
+
|
167
|
+
};
|
168
|
+
|
169
|
+
// メソッド内でthisを見るためのお約束
|
170
|
+
|
171
|
+
this.onChangeIncome = this.onChangeIncome.bind(this);
|
172
|
+
|
173
|
+
this.moneyYouWant = this.moneyYouWant.bind(this);
|
174
|
+
|
175
|
+
}
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
```
|