Hi, the following are a short description about the proposal: using
TypeError as the default is incorrect in some ways, a new
UnknownError should be introduced here and let the
TypeError only accept the type exceptions.
TypeErrorobject represents an error when a value is not of the expected type.
This is inconsistent with the current ECMA262 spec's
NativeError section, which uses the
TypeError for default use case, that's confusion a little bit, for developers, they use it as type exceptions more often, therefore I propose that a new
UnknownError is for the default case, and let the
TypeError be the type expectations only.