diff --git a/packages/core/src/highlevel/utils/inspectable.ts b/packages/core/src/highlevel/utils/inspectable.ts index 91fcbc6d..6a16e294 100644 --- a/packages/core/src/highlevel/utils/inspectable.ts +++ b/packages/core/src/highlevel/utils/inspectable.ts @@ -47,8 +47,7 @@ export function makeInspectable( } // dirty hack to set name for inspect result - // eslint-disable-next-line ts/no-implied-eval, no-new-func - const proto = new Function(`return function ${obj.name}(){}`)().prototype + const proto = ({ [obj.name]: class {} })[obj.name].prototype obj.prototype.toJSON = function () { const ret: any = Object.create(proto)