blob: 95cab5db8c8123ea7c50b6e5c55f52bda5c27503 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import gleam/io
import gleam/string
import wechat/object.{type JsObject}
fn on_launch(o: JsObject) -> Nil {
o |> object.stringify |> string.append("gleam app: ", _) |> io.println
}
fn on_show(_o: JsObject) -> Nil {
Nil
}
pub fn app() -> JsObject {
object.literal([
#("onLaunch", on_launch),
#("onShow", on_show),
])
|> object.set("data", object.new())
}
|