2021-12-18 14:36:45 +09:00
|
|
|
use napi::bindgen_prelude::*;
|
|
|
|
|
2021-09-23 02:29:09 +09:00
|
|
|
#[napi]
|
|
|
|
fn map_option(val: Option<u32>) -> Option<u32> {
|
|
|
|
val.map(|v| v + 1)
|
|
|
|
}
|
2021-12-18 14:36:45 +09:00
|
|
|
|
|
|
|
#[napi]
|
|
|
|
fn return_null() -> Null {
|
|
|
|
Null
|
|
|
|
}
|
|
|
|
|
|
|
|
#[napi]
|
|
|
|
fn return_undefined() -> Undefined {}
|