source: trip-planner-front/node_modules/@babel/plugin-proposal-optional-catch-binding/lib/index.js@ b738035

Last change on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 748 bytes
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = void 0;
7
8var _helperPluginUtils = require("@babel/helper-plugin-utils");
9
10var _pluginSyntaxOptionalCatchBinding = require("@babel/plugin-syntax-optional-catch-binding");
11
12var _default = (0, _helperPluginUtils.declare)(api => {
13 api.assertVersion(7);
14 return {
15 name: "proposal-optional-catch-binding",
16 inherits: _pluginSyntaxOptionalCatchBinding.default,
17 visitor: {
18 CatchClause(path) {
19 if (!path.node.param) {
20 const uid = path.scope.generateUidIdentifier("unused");
21 const paramPath = path.get("param");
22 paramPath.replaceWith(uid);
23 }
24 }
25
26 }
27 };
28});
29
30exports.default = _default;
Note: See TracBrowser for help on using the repository browser.