At some point, I think it was the intention that typeof uint8 yielded "function". It's not clear to me what typeof new StructType(...) was intended to yield. I think I'd personally prefer to just yield object all the time, but I don't have a good sense for what JS users "expect" here.
ping @dherman