Initial commit (from f5274cbdce4ae7c9e4b937dcdf95ac70ae436d5f)
This commit is contained in:
commit
28ccc3db2d
13974 changed files with 2618436 additions and 0 deletions
31
node_modules/@babel/helper-module-transforms/lib/rewrite-this.js
generated
vendored
Normal file
31
node_modules/@babel/helper-module-transforms/lib/rewrite-this.js
generated
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
"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();
|
||||
}
|
||||
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue