It is not possible to write a function that accepts a generic type that's bounded by TypedArrayElement and extracts a typed array from a JSObject pointer. The macro doesn't like typedarray!(in(cx) let foo: TypedArray<T> = ...) because it accepts an ident, not a ty, and making it accept a ty yields $crate::typedarray::TypedArray<T>::from(...) which is obviously incorrect.
It is not possible to write a function that accepts a generic type that's bounded by TypedArrayElement and extracts a typed array from a JSObject pointer. The macro doesn't like
typedarray!(in(cx) let foo: TypedArray<T> = ...)
because it accepts anident
, not aty
, and making it accept aty
yields$crate::typedarray::TypedArray<T>::from(...)
which is obviously incorrect.