Skip to content

Support TypedArray types... #144

Open
@nearest-river

Description

@nearest-river

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions