Skip to content

Commit 51a393a

Browse files
committed
feat(hello): added hello world contract
1 parent 2e528ee commit 51a393a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

templates/hyperweb/src/hello/index.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export default class Contract {
2+
state: {
3+
msg?: string | boolean | null;
4+
} = {};
5+
6+
constructor() { }
7+
8+
hello(x: string) {
9+
this.state.msg = x;
10+
return `Hello, ${String(this.state.msg)}`;
11+
}
12+
}

0 commit comments

Comments
 (0)