You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 5, 2021. It is now read-only.
This happens when an object contains a getter that calls another function, passing the original object as a parameter.
For example, the following code will make TypeWiz throw a RangeError at runtime:
function log(o: { someVal: number }) {
console.log(o);
}
function f(o: { someVal: number }) {
return o.someVal;
}
const obj = {
get someVal() {
// this will cause TypeWiz to enter an endless recursion when it tries to enumerate to object's keys:
log(this);
return 5;
}
};
f(obj);