napi-rs/examples/napi/src/fn_ts_override.rs

7 lines
191 B
Rust
Raw Normal View History

use napi::bindgen_prelude::{Object, Result};
#[napi(ts_args_type = "a: { foo: number }", ts_return_type = "string[]")]
fn ts_rename(a: Object) -> Result<Object> {
a.get_property_names()
}