feat: add encodeFloat decodeFloat to typescript

This commit is contained in:
2024-04-15 14:11:54 +02:00
parent 9ccd76c7d9
commit e29cb11b81
6 changed files with 150 additions and 11 deletions

View File

@@ -1,5 +1,4 @@
mod utils;
use plantarium::unwrap_float;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
@@ -17,8 +16,8 @@ pub fn get_input_types() -> String {
}
#[wasm_bindgen]
pub fn execute(var_value: JsValue) -> f64 {
pub fn execute(args: &[i32]) -> Vec<i32> {
utils::set_panic_hook();
return unwrap_float(var_value);
args.into()
}