Closed richarddd closed 11 months ago
This is the intended behavior, all those functions are constructors as they can be used as constructors (i.e. you can call them with new
). Constructor is a sub type of Function.
I didn't really intend to have the type_of function to be the same as the JavaScript typeof operator. The type has a bunch more variants then what the typeof operator can return, like Float, Int, Array, Exception and Constructor. Especially Float and Int are a integral part of rquickjs since QuickJS values store JavaScript numbers in either a Float or an Int.
When passing a named or anon function they are treated like
Constructors
and behave different from JS.Output: