1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

js: add initial support for optional types, IfGuardExpr codegen for if (#11332)

This commit is contained in:
playX
2021-08-29 14:27:17 +03:00
committed by GitHub
parent 985fe85de2
commit 61ac7b671d
3 changed files with 200 additions and 63 deletions

View File

@@ -44,3 +44,9 @@ pub fn exit(c int) {
JS.process.exit(c)
js_throw('exit($c)')
}
fn opt_ok(data voidptr, option Option) {
#option.state = 0
#option.err = none__
#option.data = data
}