Sha256: 0a8247989e9daa36d0d5c50a0b32209bc12269d144524d8f665e5976e52c2613
Contents?: true
Size: 684 Bytes
Versions: 29
Compression:
Stored size: 684 Bytes
Contents
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = rewriteThis; var _helperReplaceSupers = require("@babel/helper-replace-supers"); function rewriteThis(programPath) { programPath.traverse(rewriteThisVisitor); } const rewriteThisVisitor = { ThisExpression(path) { path.replaceWith(path.scope.buildUndefinedNode()); }, Function(path) { if (path.isMethod()) (0, _helperReplaceSupers.skipAllButComputedKey)(path);else if (!path.isArrowFunctionExpression()) path.skip(); }, ClassProperty(path) { (0, _helperReplaceSupers.skipAllButComputedKey)(path); }, ClassPrivateProperty(path) { path.skip(); } };
Version data entries
29 entries across 29 versions & 4 rubygems