nanvm_harness/gen.fixtures/
length.rs1use nanvm_lib::vm::unstable::{string_any, string_key};
4use nanvm_lib::vm::{Any, Array, IStaticFunction, ToAny, ToObject};
5
6#[rustfmt::skip]
7#[allow(clippy::if_same_then_else)]
8pub fn module<A: IStaticFunction>(_runtime: Any<A>) -> Result<Any<A>, Any<A>> {
9 Ok([(string_key("default"), (Any::dot(A::static_function(|_self, _args| {
10 let _b56: Any<A> = _args.rest(0).to_any();
11 Ok(_b56.clone())
12 }, 0, Array::default(), Some("(...$0)=>$0")).to_any(), string_any("length")).end())?)].to_object().to_any())
13}