Open
Description
TypedArrays are very helpful in certain situations...
for example a Vec<i32>
or a Box<[i32]> could be turned into an Int32Array
which is very helpful
Rust
#[deno_bindgen]
pub fn mouse_pos(this: usize)-> Box<[i32]> {
let this=unsafe { ..... };
let pos=this.mouse_position();
vec![pos.x,pos.y].into_boxed_slice()
}
denoland
export function mouse_pos(self: number|bigint): Int32Array {
return lib.symbols.mouse_pos(self);
}
Metadata
Metadata
Assignees
Labels
No labels