@babel/helpers - typeof doesn't work
Pospelove opened this issue · comments
Leonid Pospelov commented
https://github.com/babel/babel/blob/main/packages/babel-helpers/src/helpers/typeof.js
TypeError: Cannot assign to read only property '_typeof' at _typeof
Babel is configured to emit ES5
Dmitry Panov commented
Hi. Could you please provide a reproducible test case?
Leonid Pospelov commented
Hey @dop251
function _typeof(obj) {
"@babel/helpers - typeof";
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
}, _typeof(obj);
}
_typeof({});
Dmitry Panov commented
The code runs fine for me.
Leonid Pospelov commented
probably fixed in master. i'm not sure about goja ver since use indirectly. closing for now. thanks for your time!