type function in Proxy and TypedProxy constructors