mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
jsgen: optional "or blocks" (#6938)
This commit is contained in:
6
vlib/builtin/js/builtin.js.v
Normal file
6
vlib/builtin/js/builtin.js.v
Normal file
@ -0,0 +1,6 @@
|
||||
module builtin
|
||||
|
||||
// used to generate JS throw statements.
|
||||
pub fn js_throw(s any) {
|
||||
#throw (s instanceof Error ? s : new Error(s))
|
||||
}
|
Reference in New Issue
Block a user