Debian Codegraph @

packages/babel-plugin-proposal-throw-expressions/src/index.ts

raw symbols SCIP
1 import { declarescip-typescript npm @babel/helper-plugin-utils 7.20.2 src/`index.ts`/declare(). } from "@babel/helper-plugin-utils"scip-typescript npm @babel/helper-plugin-utils 7.20.2 src/`index.ts`/;
2 import syntaxThrowExpressions from "@babel/plugin-syntax-throw-expressions"scip-typescript npm @babel/plugin-syntax-throw-expressions 7.18.6 src/`index.ts`/;
3 import { types as tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/ } from "@babel/core"scip-typescript npm @babel/core 7.20.12 src/`index.ts`/;
4
5 export default declarescip-typescript npm @babel/helper-plugin-utils 7.20.2 src/`index.ts`/declare().(api => {
6 api.assertVersionscip-typescript npm @babel/core 7.20.12 src/config/helpers/`config-api.ts`/ConfigAPI#typeLiteral7:assertVersion.(7);
7
8 return {
9 namescip-typescript npm @babel/core 7.20.12 src/config/validation/`plugins.ts`/PluginObject#typeLiteral0:name.: "proposal-throw-expressions",
10 inheritsscip-typescript npm @babel/core 7.20.12 src/config/validation/`plugins.ts`/PluginObject#typeLiteral0:inherits.: syntaxThrowExpressions,
11
12 visitorscip-typescript npm @babel/core 7.20.12 src/config/validation/`plugins.ts`/PluginObject#typeLiteral0:visitor.: {
13 UnaryExpression(path) {
14 const { operatorscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/UnaryExpression#operator., argumentscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/UnaryExpression#argument. } = path.nodescip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#node.;
15 if (operator !== "throw") return;
16
17 const arrow = tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.functionExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/functionExpression().(
18 null,
19 [tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier().("e")],
20 tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.blockStatementscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/blockStatement().([tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.throwStatementscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/throwStatement().(tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier().("e"))]),
21 );
22
23 path.replaceWithscip-typescript npm @babel/traverse 7.20.13 src/path/`replacement.ts`/replaceWith().(tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.callExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/callExpression().(arrow, [argument]));
24 },
25 },
26 };
27 });