Skip to content

Commit 87db1ea

Browse files
committed
add return type to check
1 parent 1f1d0ac commit 87db1ea

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

templates/hyperweb/dist/contracts/simpleState.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/hyperweb/dist/contracts/simpleState.js.map

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/hyperweb/src/simple-state/index.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@ export default class Contract {
1414
this.state.value = 0;
1515
}
1616

17-
init() {
17+
init(): number {
1818
console.log("[Contract] init called");
1919
this.state.value = 0;
20+
return this.state.value
2021
}
2122

22-
inc(x: number) {
23+
inc(x: number): number {
2324
console.log("[Contract] inc called");
2425
this.state.value += x;
26+
return this.state.value;
2527
}
2628

2729
dec(x: number) {

0 commit comments

Comments
 (0)