@rsdoctor/core 2.0.2 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/e.js CHANGED
@@ -3,7 +3,7 @@ import { createRequire, createRequire as __rspack_createRequire } from "node:mod
3
3
  import { rspackRequire, moduleFactories, definePropertyGetters, makeNamespaceObject, compatGetDefaultExport } from "./rslib-runtime.js";
4
4
  import node_util from "node:util";
5
5
  import { Constants } from "@rsdoctor/shared/types";
6
- import { Readable, Transform } from "stream";
6
+ import { Readable } from "stream";
7
7
  import path_0, { dirname, extname, join } from "path";
8
8
  import { Loader, Lodash, Package } from "@rsdoctor/shared/common-browser";
9
9
  import node_path from "node:path";
@@ -1352,18 +1352,7 @@ makeNamespaceObject(utils_namespaceObject), definePropertyGetters(utils_namespac
1352
1352
  });
1353
1353
  var walk_namespaceObject = {};
1354
1354
  makeNamespaceObject(walk_namespaceObject), definePropertyGetters(walk_namespaceObject, {
1355
- recursive: ()=>function recursive(node, state, visitors) {
1356
- !function(ast, { enter, leave }) {
1357
- new SyncWalker(enter, leave).visit(ast, null);
1358
- }(node, {
1359
- enter (child) {
1360
- let visitor = visitors[child.type];
1361
- visitor && (this.skip(), visitor(child, state, (next, nextState)=>{
1362
- recursive(next, nextState, visitors);
1363
- }));
1364
- }
1365
- });
1366
- }
1355
+ recursive: ()=>recursive
1367
1356
  }), !function() {
1368
1357
  let { versions } = process;
1369
1358
  if (!("styleText" in node_util) && versions.node && !versions.bun && !versions.deno) throw Error(`Unsupported Node.js version: "${process.versions.node || 'unknown'}". Expected Node.js >= 20.`);
@@ -1805,16 +1794,16 @@ var esm_JsonStreamStringify = function(_Readable) {
1805
1794
  function stringify(json, replacer, space, cycle, chunkSize = 419430400) {
1806
1795
  let jsonList = [];
1807
1796
  return json && 'object' == typeof json ? new Promise((resolve, reject)=>{
1808
- let stream = new esm_JsonStreamStringify(json, replacer, space, cycle), currentLength = 0, currentContent = '', batchProcessor = new Transform({
1809
- readableObjectMode: !0,
1810
- transform (chunk, _encoding, callback) {
1811
- chunk.toString().split('\\n').forEach((line)=>{
1812
- currentLength + line.length > chunkSize && (jsonList.push(currentContent), currentContent = '', currentLength = 0), line.length && (currentContent += line, currentLength += line.length);
1813
- }), callback();
1797
+ let stream = new esm_JsonStreamStringify(json, replacer, space, cycle), currentContent = '';
1798
+ stream.setEncoding('utf8').on('data', (chunk)=>{
1799
+ let offset = 0;
1800
+ for(; offset < chunk.length;){
1801
+ let end = Math.min(offset + Math.max(chunkSize, currentContent.length + 1) - currentContent.length, chunk.length);
1802
+ if (currentContent += chunk.slice(offset, end), offset = end, currentContent.length >= chunkSize) {
1803
+ let splitAt = currentContent.length, last = currentContent.charCodeAt(splitAt - 1);
1804
+ last >= 0xd800 && last <= 0xdbff && splitAt--, splitAt > 0 && (jsonList.push(currentContent.slice(0, splitAt)), currentContent = currentContent.slice(splitAt));
1805
+ }
1814
1806
  }
1815
- });
1816
- stream.pipe(batchProcessor).on('data', (line)=>{
1817
- currentLength + line.length > chunkSize && (jsonList.push(currentContent), currentContent = '', currentLength = 0), line.length && (currentContent += line, currentLength += line.length);
1818
1807
  }).on('end', ()=>{
1819
1808
  currentContent.length > 0 && jsonList.push(currentContent), resolve(jsonList);
1820
1809
  }).on('error', (err)=>reject(err));
@@ -1831,7 +1820,7 @@ let readPackageJson = (file, readFile)=>{
1831
1820
  ...result,
1832
1821
  root: current
1833
1822
  } : readPackageJson(dirname(current), readFile);
1834
- }, JEDEC = "jedec", BYTE = "byte", ARRAY = "array", OBJECT = "object", STRING = "string", EXPONENT = "exponent", STRINGS_symbol = {
1823
+ }, JEDEC = "jedec", BYTE = "byte", ARRAY = "array", OBJECT = "object", STRING = "string", EXPONENT = "exponent", ROUND = "round", STRINGS_symbol = {
1835
1824
  iec: {
1836
1825
  bits: [
1837
1826
  "bit",
@@ -1973,7 +1962,7 @@ function applyNumberFormatting(value, locale, localeOptions, separator, pad, rou
1973
1962
  }
1974
1963
  return result;
1975
1964
  }
1976
- function filesize(arg, { bits = !1, pad = !1, base = -1, round = 2, locale = "", localeOptions = {}, separator = "", spacer = " ", symbols = {}, standard = "", output = STRING, fullform = !1, fullforms = [], exponent = -1, roundingMethod = "round", precision = 0 } = {}) {
1965
+ function filesize(arg, { bits = !1, pad = !1, base = -1, round = 2, locale = "", localeOptions = {}, separator = "", spacer = " ", symbols = {}, standard = "", output = STRING, fullform = !1, fullforms = [], exponent = -1, roundingMethod = ROUND, precision = 0 } = {}) {
1977
1966
  let p, r, symbolTable, numericValue, valueResult, e = exponent, num, result = [], val = 0, u = "", isBigInt = "bigint" == typeof arg;
1978
1967
  if (isNaN(num = Number(arg)) || !isFinite(num)) throw TypeError("Invalid number");
1979
1968
  let { isDecimal, ceil, actualStandard } = STANDARD_CONFIGS[standard] ? STANDARD_CONFIGS[standard] : 2 === base ? {
@@ -1985,7 +1974,7 @@ function filesize(arg, { bits = !1, pad = !1, base = -1, round = 2, locale = "",
1985
1974
  ceil: 1000,
1986
1975
  actualStandard: JEDEC
1987
1976
  }, full = !0 === fullform, neg = num < 0, roundingFunc = Math[roundingMethod];
1988
- if ("function" != typeof roundingFunc) throw TypeError("Invalid rounding method");
1977
+ if (roundingMethod !== ROUND && "floor" !== roundingMethod && "ceil" !== roundingMethod) throw TypeError("Invalid rounding method");
1989
1978
  if (neg && (num = -num), 0 === num) return function(precision, actualStandard, bits, symbols, full, fullforms, output, spacer, pad, round, symbol, locale = "", localeOptions = {}, separator = "") {
1990
1979
  let value;
1991
1980
  return (value = precision > 0 ? 0..toPrecision(precision) : pad && round > 0 ? 0..toFixed(round) : 0, output === EXPONENT) ? 0 : (value = applyNumberFormatting(precision <= 0 && (!0 === locale || locale.length > 0) ? 0 : value, locale, localeOptions, separator, pad && precision <= 0, round, Math.round), symbol || (symbol = bits ? STRINGS_symbol[actualStandard].bits[0] : STRINGS_symbol[actualStandard].bytes[0]), symbols[symbol] && (symbol = symbols[symbol]), full && (fullforms[0] ? symbol = fullforms[0] : (symbol = STRINGS_fullform[actualStandard][0], bits ? symbol += "bit" : symbol += BYTE)), output === ARRAY) ? [
@@ -2443,60 +2432,3070 @@ let asserts = {
2443
2432
  isRegExpLiteral: (node)=>asserts.isLiteral(node) && 'regex' in node,
2444
2433
  isBigIntLiteral: (node)=>asserts.isLiteral(node) && 'bigint' in node,
2445
2434
  isExportStatement: (node)=>asserts.isExportAllDeclaration(node) || asserts.isExportDefaultDeclaration(node) || asserts.isExportNamedDeclaration(node)
2446
- };
2447
- class WalkerBase {
2448
- constructor(){
2449
- this.should_skip = !1, this.should_remove = !1, this.replacement = null, this.context = {
2450
- skip: ()=>this.should_skip = !0,
2451
- remove: ()=>this.should_remove = !0,
2452
- replace: (node)=>this.replacement = node
2453
- };
2454
- }
2455
- replace(parent, prop, index, node) {
2456
- parent && prop && (null != index ? parent[prop][index] = node : parent[prop] = node);
2457
- }
2458
- remove(parent, prop, index) {
2459
- parent && prop && (null != index ? parent[prop].splice(index, 1) : delete parent[prop]);
2460
- }
2461
- }
2462
- class SyncWalker extends WalkerBase {
2463
- constructor(enter, leave){
2464
- super(), this.should_skip = !1, this.should_remove = !1, this.replacement = null, this.context = {
2465
- skip: ()=>this.should_skip = !0,
2466
- remove: ()=>this.should_remove = !0,
2467
- replace: (node)=>this.replacement = node
2468
- }, this.enter = enter, this.leave = leave;
2469
- }
2470
- visit(node, parent, prop, index) {
2471
- if (node) {
2472
- let key;
2473
- if (this.enter) {
2474
- let _should_skip = this.should_skip, _should_remove = this.should_remove, _replacement = this.replacement;
2475
- this.should_skip = !1, this.should_remove = !1, this.replacement = null, this.enter.call(this.context, node, parent, prop, index), this.replacement && (node = this.replacement, this.replace(parent, prop, index, node)), this.should_remove && this.remove(parent, prop, index);
2476
- let skipped = this.should_skip, removed = this.should_remove;
2477
- if (this.should_skip = _should_skip, this.should_remove = _should_remove, this.replacement = _replacement, skipped) return node;
2478
- if (removed) return null;
2479
- }
2480
- for(key in node){
2481
- let value = node[key];
2482
- if (value && 'object' == typeof value) if (Array.isArray(value)) for(let i = 0; i < value.length; i += 1){
2483
- let item = value[i];
2484
- isNode(item) && !this.visit(item, node, key, i) && i--;
2485
- }
2486
- else isNode(value) && this.visit(value, node, key, null);
2487
- }
2488
- if (this.leave) {
2489
- let _replacement = this.replacement, _should_remove = this.should_remove;
2490
- this.replacement = null, this.should_remove = !1, this.leave.call(this.context, node, parent, prop, index), this.replacement && (node = this.replacement, this.replace(parent, prop, index, node)), this.should_remove && this.remove(parent, prop, index);
2491
- let removed = this.should_remove;
2492
- if (this.replacement = _replacement, this.should_remove = _should_remove, removed) return null;
2493
- }
2494
- }
2495
- return node;
2435
+ }, childVisitors = {
2436
+ AccessorProperty (node, walker) {
2437
+ let child0 = node.decorators;
2438
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
2439
+ let child1 = node.key;
2440
+ if (null != child1 && walker.visitScalar(child1, node, "key")) return !0;
2441
+ let child2 = node.typeAnnotation;
2442
+ if (null != child2 && walker.visitScalar(child2, node, "typeAnnotation")) return !0;
2443
+ let child3 = node.value;
2444
+ return !!(null != child3 && walker.visitScalar(child3, node, "value"));
2445
+ },
2446
+ ArrayExpression (node, walker) {
2447
+ let child0 = node.elements;
2448
+ return !!(null != child0 && walker.visitList(child0, node, "elements"));
2449
+ },
2450
+ ArrayPattern (node, walker) {
2451
+ let child0 = node.decorators;
2452
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
2453
+ let child1 = node.elements;
2454
+ if (null != child1 && walker.visitList(child1, node, "elements")) return !0;
2455
+ let child2 = node.typeAnnotation;
2456
+ return !!(null != child2 && walker.visitScalar(child2, node, "typeAnnotation"));
2457
+ },
2458
+ ArrowFunctionExpression (node, walker) {
2459
+ let child0 = node.typeParameters;
2460
+ if (null != child0 && walker.visitScalar(child0, node, "typeParameters")) return !0;
2461
+ let child1 = node.params;
2462
+ if (null != child1 && walker.visitList(child1, node, "params")) return !0;
2463
+ let child2 = node.returnType;
2464
+ if (null != child2 && walker.visitScalar(child2, node, "returnType")) return !0;
2465
+ let child3 = node.body;
2466
+ return !!(null != child3 && walker.visitScalar(child3, node, "body"));
2467
+ },
2468
+ AssignmentExpression (node, walker) {
2469
+ let child0 = node.left;
2470
+ if (null != child0 && walker.visitScalar(child0, node, "left")) return !0;
2471
+ let child1 = node.right;
2472
+ return !!(null != child1 && walker.visitScalar(child1, node, "right"));
2473
+ },
2474
+ AssignmentPattern (node, walker) {
2475
+ let child0 = node.decorators;
2476
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
2477
+ let child1 = node.left;
2478
+ if (null != child1 && walker.visitScalar(child1, node, "left")) return !0;
2479
+ let child2 = node.typeAnnotation;
2480
+ if (null != child2 && walker.visitScalar(child2, node, "typeAnnotation")) return !0;
2481
+ let child3 = node.right;
2482
+ return !!(null != child3 && walker.visitScalar(child3, node, "right"));
2483
+ },
2484
+ AwaitExpression (node, walker) {
2485
+ let child0 = node.argument;
2486
+ return !!(null != child0 && walker.visitScalar(child0, node, "argument"));
2487
+ },
2488
+ BinaryExpression (node, walker) {
2489
+ let child0 = node.left;
2490
+ if (null != child0 && walker.visitScalar(child0, node, "left")) return !0;
2491
+ let child1 = node.right;
2492
+ return !!(null != child1 && walker.visitScalar(child1, node, "right"));
2493
+ },
2494
+ BlockStatement (node, walker) {
2495
+ let child0 = node.body;
2496
+ return !!(null != child0 && walker.visitList(child0, node, "body"));
2497
+ },
2498
+ BreakStatement (node, walker) {
2499
+ let child0 = node.label;
2500
+ return !!(null != child0 && walker.visitScalar(child0, node, "label"));
2501
+ },
2502
+ CallExpression (node, walker) {
2503
+ let child0 = node.callee;
2504
+ if (null != child0 && walker.visitScalar(child0, node, "callee")) return !0;
2505
+ let child1 = node.typeArguments;
2506
+ if (null != child1 && walker.visitScalar(child1, node, "typeArguments")) return !0;
2507
+ let child2 = node.arguments;
2508
+ return !!(null != child2 && walker.visitList(child2, node, "arguments"));
2509
+ },
2510
+ CatchClause (node, walker) {
2511
+ let child0 = node.param;
2512
+ if (null != child0 && walker.visitScalar(child0, node, "param")) return !0;
2513
+ let child1 = node.body;
2514
+ return !!(null != child1 && walker.visitScalar(child1, node, "body"));
2515
+ },
2516
+ ChainExpression (node, walker) {
2517
+ let child0 = node.expression;
2518
+ return !!(null != child0 && walker.visitScalar(child0, node, "expression"));
2519
+ },
2520
+ ClassBody (node, walker) {
2521
+ let child0 = node.body;
2522
+ return !!(null != child0 && walker.visitList(child0, node, "body"));
2523
+ },
2524
+ ClassDeclaration (node, walker) {
2525
+ let child0 = node.decorators;
2526
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
2527
+ let child1 = node.id;
2528
+ if (null != child1 && walker.visitScalar(child1, node, "id")) return !0;
2529
+ let child2 = node.typeParameters;
2530
+ if (null != child2 && walker.visitScalar(child2, node, "typeParameters")) return !0;
2531
+ let child3 = node.superClass;
2532
+ if (null != child3 && walker.visitScalar(child3, node, "superClass")) return !0;
2533
+ let child4 = node.superTypeArguments;
2534
+ if (null != child4 && walker.visitScalar(child4, node, "superTypeArguments")) return !0;
2535
+ let child5 = node.implements;
2536
+ if (null != child5 && walker.visitList(child5, node, "implements")) return !0;
2537
+ let child6 = node.body;
2538
+ return !!(null != child6 && walker.visitScalar(child6, node, "body"));
2539
+ },
2540
+ ClassExpression (node, walker) {
2541
+ let child0 = node.decorators;
2542
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
2543
+ let child1 = node.id;
2544
+ if (null != child1 && walker.visitScalar(child1, node, "id")) return !0;
2545
+ let child2 = node.typeParameters;
2546
+ if (null != child2 && walker.visitScalar(child2, node, "typeParameters")) return !0;
2547
+ let child3 = node.superClass;
2548
+ if (null != child3 && walker.visitScalar(child3, node, "superClass")) return !0;
2549
+ let child4 = node.superTypeArguments;
2550
+ if (null != child4 && walker.visitScalar(child4, node, "superTypeArguments")) return !0;
2551
+ let child5 = node.implements;
2552
+ if (null != child5 && walker.visitList(child5, node, "implements")) return !0;
2553
+ let child6 = node.body;
2554
+ return !!(null != child6 && walker.visitScalar(child6, node, "body"));
2555
+ },
2556
+ ConditionalExpression (node, walker) {
2557
+ let child0 = node.test;
2558
+ if (null != child0 && walker.visitScalar(child0, node, "test")) return !0;
2559
+ let child1 = node.consequent;
2560
+ if (null != child1 && walker.visitScalar(child1, node, "consequent")) return !0;
2561
+ let child2 = node.alternate;
2562
+ return !!(null != child2 && walker.visitScalar(child2, node, "alternate"));
2563
+ },
2564
+ ContinueStatement (node, walker) {
2565
+ let child0 = node.label;
2566
+ return !!(null != child0 && walker.visitScalar(child0, node, "label"));
2567
+ },
2568
+ DebuggerStatement: null,
2569
+ Decorator (node, walker) {
2570
+ let child0 = node.expression;
2571
+ return !!(null != child0 && walker.visitScalar(child0, node, "expression"));
2572
+ },
2573
+ DoWhileStatement (node, walker) {
2574
+ let child0 = node.body;
2575
+ if (null != child0 && walker.visitScalar(child0, node, "body")) return !0;
2576
+ let child1 = node.test;
2577
+ return !!(null != child1 && walker.visitScalar(child1, node, "test"));
2578
+ },
2579
+ EmptyStatement: null,
2580
+ ExportAllDeclaration (node, walker) {
2581
+ let child0 = node.exported;
2582
+ if (null != child0 && walker.visitScalar(child0, node, "exported")) return !0;
2583
+ let child1 = node.source;
2584
+ if (null != child1 && walker.visitScalar(child1, node, "source")) return !0;
2585
+ let child2 = node.attributes;
2586
+ return !!(null != child2 && walker.visitListKnown(child2, node, "attributes", dispatchImportAttribute));
2587
+ },
2588
+ ExportDefaultDeclaration (node, walker) {
2589
+ let child0 = node.declaration;
2590
+ return !!(null != child0 && walker.visitScalar(child0, node, "declaration"));
2591
+ },
2592
+ ExportNamedDeclaration (node, walker) {
2593
+ let child0 = node.declaration;
2594
+ if (null != child0 && walker.visitScalar(child0, node, "declaration")) return !0;
2595
+ let child1 = node.specifiers;
2596
+ if (null != child1 && walker.visitListKnown(child1, node, "specifiers", dispatchExportSpecifier)) return !0;
2597
+ let child2 = node.source;
2598
+ if (null != child2 && walker.visitScalar(child2, node, "source")) return !0;
2599
+ let child3 = node.attributes;
2600
+ return !!(null != child3 && walker.visitListKnown(child3, node, "attributes", dispatchImportAttribute));
2601
+ },
2602
+ ExportSpecifier (node, walker) {
2603
+ let child0 = node.local;
2604
+ if (null != child0 && walker.visitScalar(child0, node, "local")) return !0;
2605
+ let child1 = node.exported;
2606
+ return !!(null != child1 && walker.visitScalar(child1, node, "exported"));
2607
+ },
2608
+ ExpressionStatement (node, walker) {
2609
+ let child0 = node.expression;
2610
+ return !!(null != child0 && walker.visitScalar(child0, node, "expression"));
2611
+ },
2612
+ ForInStatement (node, walker) {
2613
+ let child0 = node.left;
2614
+ if (null != child0 && walker.visitScalar(child0, node, "left")) return !0;
2615
+ let child1 = node.right;
2616
+ if (null != child1 && walker.visitScalar(child1, node, "right")) return !0;
2617
+ let child2 = node.body;
2618
+ return !!(null != child2 && walker.visitScalar(child2, node, "body"));
2619
+ },
2620
+ ForOfStatement (node, walker) {
2621
+ let child0 = node.left;
2622
+ if (null != child0 && walker.visitScalar(child0, node, "left")) return !0;
2623
+ let child1 = node.right;
2624
+ if (null != child1 && walker.visitScalar(child1, node, "right")) return !0;
2625
+ let child2 = node.body;
2626
+ return !!(null != child2 && walker.visitScalar(child2, node, "body"));
2627
+ },
2628
+ ForStatement (node, walker) {
2629
+ let child0 = node.init;
2630
+ if (null != child0 && walker.visitScalar(child0, node, "init")) return !0;
2631
+ let child1 = node.test;
2632
+ if (null != child1 && walker.visitScalar(child1, node, "test")) return !0;
2633
+ let child2 = node.update;
2634
+ if (null != child2 && walker.visitScalar(child2, node, "update")) return !0;
2635
+ let child3 = node.body;
2636
+ return !!(null != child3 && walker.visitScalar(child3, node, "body"));
2637
+ },
2638
+ FunctionDeclaration (node, walker) {
2639
+ let child0 = node.id;
2640
+ if (null != child0 && walker.visitScalar(child0, node, "id")) return !0;
2641
+ let child1 = node.typeParameters;
2642
+ if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return !0;
2643
+ let child2 = node.params;
2644
+ if (null != child2 && walker.visitList(child2, node, "params")) return !0;
2645
+ let child3 = node.returnType;
2646
+ if (null != child3 && walker.visitScalar(child3, node, "returnType")) return !0;
2647
+ let child4 = node.body;
2648
+ return !!(null != child4 && walker.visitScalar(child4, node, "body"));
2649
+ },
2650
+ FunctionExpression (node, walker) {
2651
+ let child0 = node.id;
2652
+ if (null != child0 && walker.visitScalar(child0, node, "id")) return !0;
2653
+ let child1 = node.typeParameters;
2654
+ if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return !0;
2655
+ let child2 = node.params;
2656
+ if (null != child2 && walker.visitList(child2, node, "params")) return !0;
2657
+ let child3 = node.returnType;
2658
+ if (null != child3 && walker.visitScalar(child3, node, "returnType")) return !0;
2659
+ let child4 = node.body;
2660
+ return !!(null != child4 && walker.visitScalar(child4, node, "body"));
2661
+ },
2662
+ Hashbang: null,
2663
+ Identifier (node, walker) {
2664
+ let child0 = node.decorators;
2665
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
2666
+ let child1 = node.typeAnnotation;
2667
+ return !!(null != child1 && walker.visitScalar(child1, node, "typeAnnotation"));
2668
+ },
2669
+ IfStatement (node, walker) {
2670
+ let child0 = node.test;
2671
+ if (null != child0 && walker.visitScalar(child0, node, "test")) return !0;
2672
+ let child1 = node.consequent;
2673
+ if (null != child1 && walker.visitScalar(child1, node, "consequent")) return !0;
2674
+ let child2 = node.alternate;
2675
+ return !!(null != child2 && walker.visitScalar(child2, node, "alternate"));
2676
+ },
2677
+ ImportAttribute (node, walker) {
2678
+ let child0 = node.key;
2679
+ if (null != child0 && walker.visitScalar(child0, node, "key")) return !0;
2680
+ let child1 = node.value;
2681
+ return !!(null != child1 && walker.visitScalar(child1, node, "value"));
2682
+ },
2683
+ ImportDeclaration (node, walker) {
2684
+ let child0 = node.specifiers;
2685
+ if (null != child0 && walker.visitList(child0, node, "specifiers")) return !0;
2686
+ let child1 = node.source;
2687
+ if (null != child1 && walker.visitScalar(child1, node, "source")) return !0;
2688
+ let child2 = node.attributes;
2689
+ return !!(null != child2 && walker.visitListKnown(child2, node, "attributes", dispatchImportAttribute));
2690
+ },
2691
+ ImportDefaultSpecifier (node, walker) {
2692
+ let child0 = node.local;
2693
+ return !!(null != child0 && walker.visitScalar(child0, node, "local"));
2694
+ },
2695
+ ImportExpression (node, walker) {
2696
+ let child0 = node.source;
2697
+ if (null != child0 && walker.visitScalar(child0, node, "source")) return !0;
2698
+ let child1 = node.options;
2699
+ return !!(null != child1 && walker.visitScalar(child1, node, "options"));
2700
+ },
2701
+ ImportNamespaceSpecifier (node, walker) {
2702
+ let child0 = node.local;
2703
+ return !!(null != child0 && walker.visitScalar(child0, node, "local"));
2704
+ },
2705
+ ImportSpecifier (node, walker) {
2706
+ let child0 = node.imported;
2707
+ if (null != child0 && walker.visitScalar(child0, node, "imported")) return !0;
2708
+ let child1 = node.local;
2709
+ return !!(null != child1 && walker.visitScalar(child1, node, "local"));
2710
+ },
2711
+ JSXAttribute (node, walker) {
2712
+ let child0 = node.name;
2713
+ if (null != child0 && walker.visitScalar(child0, node, "name")) return !0;
2714
+ let child1 = node.value;
2715
+ return !!(null != child1 && walker.visitScalar(child1, node, "value"));
2716
+ },
2717
+ JSXClosingElement (node, walker) {
2718
+ let child0 = node.name;
2719
+ return !!(null != child0 && walker.visitScalar(child0, node, "name"));
2720
+ },
2721
+ JSXClosingFragment: null,
2722
+ JSXElement (node, walker) {
2723
+ let child0 = node.openingElement;
2724
+ if (null != child0 && walker.visitScalar(child0, node, "openingElement")) return !0;
2725
+ let child1 = node.children;
2726
+ if (null != child1 && walker.visitList(child1, node, "children")) return !0;
2727
+ let child2 = node.closingElement;
2728
+ return !!(null != child2 && walker.visitScalar(child2, node, "closingElement"));
2729
+ },
2730
+ JSXEmptyExpression: null,
2731
+ JSXExpressionContainer (node, walker) {
2732
+ let child0 = node.expression;
2733
+ return !!(null != child0 && walker.visitScalar(child0, node, "expression"));
2734
+ },
2735
+ JSXFragment (node, walker) {
2736
+ let child0 = node.openingFragment;
2737
+ if (null != child0 && walker.visitScalar(child0, node, "openingFragment")) return !0;
2738
+ let child1 = node.children;
2739
+ if (null != child1 && walker.visitList(child1, node, "children")) return !0;
2740
+ let child2 = node.closingFragment;
2741
+ return !!(null != child2 && walker.visitScalar(child2, node, "closingFragment"));
2742
+ },
2743
+ JSXIdentifier: null,
2744
+ JSXMemberExpression (node, walker) {
2745
+ let child0 = node.object;
2746
+ if (null != child0 && walker.visitScalar(child0, node, "object")) return !0;
2747
+ let child1 = node.property;
2748
+ return !!(null != child1 && walker.visitScalar(child1, node, "property"));
2749
+ },
2750
+ JSXNamespacedName (node, walker) {
2751
+ let child0 = node.namespace;
2752
+ if (null != child0 && walker.visitScalar(child0, node, "namespace")) return !0;
2753
+ let child1 = node.name;
2754
+ return !!(null != child1 && walker.visitScalar(child1, node, "name"));
2755
+ },
2756
+ JSXOpeningElement (node, walker) {
2757
+ let child0 = node.name;
2758
+ if (null != child0 && walker.visitScalar(child0, node, "name")) return !0;
2759
+ let child1 = node.typeArguments;
2760
+ if (null != child1 && walker.visitScalar(child1, node, "typeArguments")) return !0;
2761
+ let child2 = node.attributes;
2762
+ return !!(null != child2 && walker.visitList(child2, node, "attributes"));
2763
+ },
2764
+ JSXOpeningFragment: null,
2765
+ JSXSpreadAttribute (node, walker) {
2766
+ let child0 = node.argument;
2767
+ return !!(null != child0 && walker.visitScalar(child0, node, "argument"));
2768
+ },
2769
+ JSXSpreadChild (node, walker) {
2770
+ let child0 = node.expression;
2771
+ return !!(null != child0 && walker.visitScalar(child0, node, "expression"));
2772
+ },
2773
+ JSXText: null,
2774
+ LabeledStatement (node, walker) {
2775
+ let child0 = node.label;
2776
+ if (null != child0 && walker.visitScalar(child0, node, "label")) return !0;
2777
+ let child1 = node.body;
2778
+ return !!(null != child1 && walker.visitScalar(child1, node, "body"));
2779
+ },
2780
+ Literal: null,
2781
+ LogicalExpression (node, walker) {
2782
+ let child0 = node.left;
2783
+ if (null != child0 && walker.visitScalar(child0, node, "left")) return !0;
2784
+ let child1 = node.right;
2785
+ return !!(null != child1 && walker.visitScalar(child1, node, "right"));
2786
+ },
2787
+ MemberExpression (node, walker) {
2788
+ let child0 = node.object;
2789
+ if (null != child0 && walker.visitScalar(child0, node, "object")) return !0;
2790
+ let child1 = node.property;
2791
+ return !!(null != child1 && walker.visitScalar(child1, node, "property"));
2792
+ },
2793
+ MetaProperty (node, walker) {
2794
+ let child0 = node.meta;
2795
+ if (null != child0 && walker.visitScalar(child0, node, "meta")) return !0;
2796
+ let child1 = node.property;
2797
+ return !!(null != child1 && walker.visitScalar(child1, node, "property"));
2798
+ },
2799
+ MethodDefinition (node, walker) {
2800
+ let child0 = node.decorators;
2801
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
2802
+ let child1 = node.key;
2803
+ if (null != child1 && walker.visitScalar(child1, node, "key")) return !0;
2804
+ let child2 = node.value;
2805
+ return !!(null != child2 && walker.visitScalar(child2, node, "value"));
2806
+ },
2807
+ NewExpression (node, walker) {
2808
+ let child0 = node.callee;
2809
+ if (null != child0 && walker.visitScalar(child0, node, "callee")) return !0;
2810
+ let child1 = node.typeArguments;
2811
+ if (null != child1 && walker.visitScalar(child1, node, "typeArguments")) return !0;
2812
+ let child2 = node.arguments;
2813
+ return !!(null != child2 && walker.visitList(child2, node, "arguments"));
2814
+ },
2815
+ ObjectExpression (node, walker) {
2816
+ let child0 = node.properties;
2817
+ return !!(null != child0 && walker.visitList(child0, node, "properties"));
2818
+ },
2819
+ ObjectPattern (node, walker) {
2820
+ let child0 = node.decorators;
2821
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
2822
+ let child1 = node.properties;
2823
+ if (null != child1 && walker.visitList(child1, node, "properties")) return !0;
2824
+ let child2 = node.typeAnnotation;
2825
+ return !!(null != child2 && walker.visitScalar(child2, node, "typeAnnotation"));
2826
+ },
2827
+ ParenthesizedExpression (node, walker) {
2828
+ let child0 = node.expression;
2829
+ return !!(null != child0 && walker.visitScalar(child0, node, "expression"));
2830
+ },
2831
+ PrivateIdentifier: null,
2832
+ Program (node, walker) {
2833
+ let child0 = node.hashbang;
2834
+ if (null != child0 && walker.visitScalar(child0, node, "hashbang")) return !0;
2835
+ let child1 = node.body;
2836
+ return !!(null != child1 && walker.visitList(child1, node, "body"));
2837
+ },
2838
+ Property (node, walker) {
2839
+ let child0 = node.key;
2840
+ if (null != child0 && walker.visitScalar(child0, node, "key")) return !0;
2841
+ let child1 = node.value;
2842
+ return !!(null != child1 && walker.visitScalar(child1, node, "value"));
2843
+ },
2844
+ PropertyDefinition (node, walker) {
2845
+ let child0 = node.decorators;
2846
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
2847
+ let child1 = node.key;
2848
+ if (null != child1 && walker.visitScalar(child1, node, "key")) return !0;
2849
+ let child2 = node.typeAnnotation;
2850
+ if (null != child2 && walker.visitScalar(child2, node, "typeAnnotation")) return !0;
2851
+ let child3 = node.value;
2852
+ return !!(null != child3 && walker.visitScalar(child3, node, "value"));
2853
+ },
2854
+ RestElement (node, walker) {
2855
+ let child0 = node.decorators;
2856
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
2857
+ let child1 = node.argument;
2858
+ if (null != child1 && walker.visitScalar(child1, node, "argument")) return !0;
2859
+ let child2 = node.typeAnnotation;
2860
+ return !!(null != child2 && walker.visitScalar(child2, node, "typeAnnotation"));
2861
+ },
2862
+ ReturnStatement (node, walker) {
2863
+ let child0 = node.argument;
2864
+ return !!(null != child0 && walker.visitScalar(child0, node, "argument"));
2865
+ },
2866
+ SequenceExpression (node, walker) {
2867
+ let child0 = node.expressions;
2868
+ return !!(null != child0 && walker.visitList(child0, node, "expressions"));
2869
+ },
2870
+ SpreadElement (node, walker) {
2871
+ let child0 = node.argument;
2872
+ return !!(null != child0 && walker.visitScalar(child0, node, "argument"));
2873
+ },
2874
+ StaticBlock (node, walker) {
2875
+ let child0 = node.body;
2876
+ return !!(null != child0 && walker.visitList(child0, node, "body"));
2877
+ },
2878
+ Super: null,
2879
+ SwitchCase (node, walker) {
2880
+ let child0 = node.test;
2881
+ if (null != child0 && walker.visitScalar(child0, node, "test")) return !0;
2882
+ let child1 = node.consequent;
2883
+ return !!(null != child1 && walker.visitList(child1, node, "consequent"));
2884
+ },
2885
+ SwitchStatement (node, walker) {
2886
+ let child0 = node.discriminant;
2887
+ if (null != child0 && walker.visitScalar(child0, node, "discriminant")) return !0;
2888
+ let child1 = node.cases;
2889
+ return !!(null != child1 && walker.visitListKnown(child1, node, "cases", dispatchSwitchCase));
2890
+ },
2891
+ TSAbstractAccessorProperty (node, walker) {
2892
+ let child0 = node.decorators;
2893
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
2894
+ let child1 = node.key;
2895
+ if (null != child1 && walker.visitScalar(child1, node, "key")) return !0;
2896
+ let child2 = node.typeAnnotation;
2897
+ if (null != child2 && walker.visitScalar(child2, node, "typeAnnotation")) return !0;
2898
+ let child3 = node.value;
2899
+ return !!(null != child3 && walker.visitScalar(child3, node, "value"));
2900
+ },
2901
+ TSAbstractMethodDefinition (node, walker) {
2902
+ let child0 = node.decorators;
2903
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
2904
+ let child1 = node.key;
2905
+ if (null != child1 && walker.visitScalar(child1, node, "key")) return !0;
2906
+ let child2 = node.value;
2907
+ return !!(null != child2 && walker.visitScalar(child2, node, "value"));
2908
+ },
2909
+ TSAbstractPropertyDefinition (node, walker) {
2910
+ let child0 = node.decorators;
2911
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
2912
+ let child1 = node.key;
2913
+ if (null != child1 && walker.visitScalar(child1, node, "key")) return !0;
2914
+ let child2 = node.typeAnnotation;
2915
+ if (null != child2 && walker.visitScalar(child2, node, "typeAnnotation")) return !0;
2916
+ let child3 = node.value;
2917
+ return !!(null != child3 && walker.visitScalar(child3, node, "value"));
2918
+ },
2919
+ TSAnyKeyword: null,
2920
+ TSArrayType (node, walker) {
2921
+ let child0 = node.elementType;
2922
+ return !!(null != child0 && walker.visitScalar(child0, node, "elementType"));
2923
+ },
2924
+ TSAsExpression (node, walker) {
2925
+ let child0 = node.expression;
2926
+ if (null != child0 && walker.visitScalar(child0, node, "expression")) return !0;
2927
+ let child1 = node.typeAnnotation;
2928
+ return !!(null != child1 && walker.visitScalar(child1, node, "typeAnnotation"));
2929
+ },
2930
+ TSBigIntKeyword: null,
2931
+ TSBooleanKeyword: null,
2932
+ TSCallSignatureDeclaration (node, walker) {
2933
+ let child0 = node.typeParameters;
2934
+ if (null != child0 && walker.visitScalar(child0, node, "typeParameters")) return !0;
2935
+ let child1 = node.params;
2936
+ if (null != child1 && walker.visitList(child1, node, "params")) return !0;
2937
+ let child2 = node.returnType;
2938
+ return !!(null != child2 && walker.visitScalar(child2, node, "returnType"));
2939
+ },
2940
+ TSClassImplements (node, walker) {
2941
+ let child0 = node.expression;
2942
+ if (null != child0 && walker.visitScalar(child0, node, "expression")) return !0;
2943
+ let child1 = node.typeArguments;
2944
+ return !!(null != child1 && walker.visitScalar(child1, node, "typeArguments"));
2945
+ },
2946
+ TSConditionalType (node, walker) {
2947
+ let child0 = node.checkType;
2948
+ if (null != child0 && walker.visitScalar(child0, node, "checkType")) return !0;
2949
+ let child1 = node.extendsType;
2950
+ if (null != child1 && walker.visitScalar(child1, node, "extendsType")) return !0;
2951
+ let child2 = node.trueType;
2952
+ if (null != child2 && walker.visitScalar(child2, node, "trueType")) return !0;
2953
+ let child3 = node.falseType;
2954
+ return !!(null != child3 && walker.visitScalar(child3, node, "falseType"));
2955
+ },
2956
+ TSConstructSignatureDeclaration (node, walker) {
2957
+ let child0 = node.typeParameters;
2958
+ if (null != child0 && walker.visitScalar(child0, node, "typeParameters")) return !0;
2959
+ let child1 = node.params;
2960
+ if (null != child1 && walker.visitList(child1, node, "params")) return !0;
2961
+ let child2 = node.returnType;
2962
+ return !!(null != child2 && walker.visitScalar(child2, node, "returnType"));
2963
+ },
2964
+ TSConstructorType (node, walker) {
2965
+ let child0 = node.typeParameters;
2966
+ if (null != child0 && walker.visitScalar(child0, node, "typeParameters")) return !0;
2967
+ let child1 = node.params;
2968
+ if (null != child1 && walker.visitList(child1, node, "params")) return !0;
2969
+ let child2 = node.returnType;
2970
+ return !!(null != child2 && walker.visitScalar(child2, node, "returnType"));
2971
+ },
2972
+ TSDeclareFunction (node, walker) {
2973
+ let child0 = node.id;
2974
+ if (null != child0 && walker.visitScalar(child0, node, "id")) return !0;
2975
+ let child1 = node.typeParameters;
2976
+ if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return !0;
2977
+ let child2 = node.params;
2978
+ if (null != child2 && walker.visitList(child2, node, "params")) return !0;
2979
+ let child3 = node.returnType;
2980
+ if (null != child3 && walker.visitScalar(child3, node, "returnType")) return !0;
2981
+ let child4 = node.body;
2982
+ return !!(null != child4 && walker.visitScalar(child4, node, "body"));
2983
+ },
2984
+ TSEmptyBodyFunctionExpression (node, walker) {
2985
+ let child0 = node.id;
2986
+ if (null != child0 && walker.visitScalar(child0, node, "id")) return !0;
2987
+ let child1 = node.typeParameters;
2988
+ if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return !0;
2989
+ let child2 = node.params;
2990
+ if (null != child2 && walker.visitList(child2, node, "params")) return !0;
2991
+ let child3 = node.returnType;
2992
+ if (null != child3 && walker.visitScalar(child3, node, "returnType")) return !0;
2993
+ let child4 = node.body;
2994
+ return !!(null != child4 && walker.visitScalar(child4, node, "body"));
2995
+ },
2996
+ TSEnumBody (node, walker) {
2997
+ let child0 = node.members;
2998
+ return !!(null != child0 && walker.visitListKnown(child0, node, "members", dispatchTSEnumMember));
2999
+ },
3000
+ TSEnumDeclaration (node, walker) {
3001
+ let child0 = node.id;
3002
+ if (null != child0 && walker.visitScalar(child0, node, "id")) return !0;
3003
+ let child1 = node.body;
3004
+ return !!(null != child1 && walker.visitScalar(child1, node, "body"));
3005
+ },
3006
+ TSEnumMember (node, walker) {
3007
+ let child0 = node.id;
3008
+ if (null != child0 && walker.visitScalar(child0, node, "id")) return !0;
3009
+ let child1 = node.initializer;
3010
+ return !!(null != child1 && walker.visitScalar(child1, node, "initializer"));
3011
+ },
3012
+ TSExportAssignment (node, walker) {
3013
+ let child0 = node.expression;
3014
+ return !!(null != child0 && walker.visitScalar(child0, node, "expression"));
3015
+ },
3016
+ TSExternalModuleReference (node, walker) {
3017
+ let child0 = node.expression;
3018
+ return !!(null != child0 && walker.visitScalar(child0, node, "expression"));
3019
+ },
3020
+ TSFunctionType (node, walker) {
3021
+ let child0 = node.typeParameters;
3022
+ if (null != child0 && walker.visitScalar(child0, node, "typeParameters")) return !0;
3023
+ let child1 = node.params;
3024
+ if (null != child1 && walker.visitList(child1, node, "params")) return !0;
3025
+ let child2 = node.returnType;
3026
+ return !!(null != child2 && walker.visitScalar(child2, node, "returnType"));
3027
+ },
3028
+ TSImportEqualsDeclaration (node, walker) {
3029
+ let child0 = node.id;
3030
+ if (null != child0 && walker.visitScalar(child0, node, "id")) return !0;
3031
+ let child1 = node.moduleReference;
3032
+ return !!(null != child1 && walker.visitScalar(child1, node, "moduleReference"));
3033
+ },
3034
+ TSImportType (node, walker) {
3035
+ let child0 = node.source;
3036
+ if (null != child0 && walker.visitScalar(child0, node, "source")) return !0;
3037
+ let child1 = node.options;
3038
+ if (null != child1 && walker.visitScalar(child1, node, "options")) return !0;
3039
+ let child2 = node.qualifier;
3040
+ if (null != child2 && walker.visitScalar(child2, node, "qualifier")) return !0;
3041
+ let child3 = node.typeArguments;
3042
+ return !!(null != child3 && walker.visitScalar(child3, node, "typeArguments"));
3043
+ },
3044
+ TSIndexSignature (node, walker) {
3045
+ let child0 = node.parameters;
3046
+ if (null != child0 && walker.visitList(child0, node, "parameters")) return !0;
3047
+ let child1 = node.typeAnnotation;
3048
+ return !!(null != child1 && walker.visitScalar(child1, node, "typeAnnotation"));
3049
+ },
3050
+ TSIndexedAccessType (node, walker) {
3051
+ let child0 = node.objectType;
3052
+ if (null != child0 && walker.visitScalar(child0, node, "objectType")) return !0;
3053
+ let child1 = node.indexType;
3054
+ return !!(null != child1 && walker.visitScalar(child1, node, "indexType"));
3055
+ },
3056
+ TSInferType (node, walker) {
3057
+ let child0 = node.typeParameter;
3058
+ return !!(null != child0 && walker.visitScalar(child0, node, "typeParameter"));
3059
+ },
3060
+ TSInstantiationExpression (node, walker) {
3061
+ let child0 = node.expression;
3062
+ if (null != child0 && walker.visitScalar(child0, node, "expression")) return !0;
3063
+ let child1 = node.typeArguments;
3064
+ return !!(null != child1 && walker.visitScalar(child1, node, "typeArguments"));
3065
+ },
3066
+ TSInterfaceBody (node, walker) {
3067
+ let child0 = node.body;
3068
+ return !!(null != child0 && walker.visitList(child0, node, "body"));
3069
+ },
3070
+ TSInterfaceDeclaration (node, walker) {
3071
+ let child0 = node.id;
3072
+ if (null != child0 && walker.visitScalar(child0, node, "id")) return !0;
3073
+ let child1 = node.typeParameters;
3074
+ if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return !0;
3075
+ let child2 = node.extends;
3076
+ if (null != child2 && walker.visitListKnown(child2, node, "extends", dispatchTSInterfaceHeritage)) return !0;
3077
+ let child3 = node.body;
3078
+ return !!(null != child3 && walker.visitScalar(child3, node, "body"));
3079
+ },
3080
+ TSInterfaceHeritage (node, walker) {
3081
+ let child0 = node.expression;
3082
+ if (null != child0 && walker.visitScalar(child0, node, "expression")) return !0;
3083
+ let child1 = node.typeArguments;
3084
+ return !!(null != child1 && walker.visitScalar(child1, node, "typeArguments"));
3085
+ },
3086
+ TSIntersectionType (node, walker) {
3087
+ let child0 = node.types;
3088
+ return !!(null != child0 && walker.visitList(child0, node, "types"));
3089
+ },
3090
+ TSIntrinsicKeyword: null,
3091
+ TSJSDocNonNullableType (node, walker) {
3092
+ let child0 = node.typeAnnotation;
3093
+ return !!(null != child0 && walker.visitScalar(child0, node, "typeAnnotation"));
3094
+ },
3095
+ TSJSDocNullableType (node, walker) {
3096
+ let child0 = node.typeAnnotation;
3097
+ return !!(null != child0 && walker.visitScalar(child0, node, "typeAnnotation"));
3098
+ },
3099
+ TSJSDocUnknownType: null,
3100
+ TSLiteralType (node, walker) {
3101
+ let child0 = node.literal;
3102
+ return !!(null != child0 && walker.visitScalar(child0, node, "literal"));
3103
+ },
3104
+ TSMappedType (node, walker) {
3105
+ let child0 = node.key;
3106
+ if (null != child0 && walker.visitScalar(child0, node, "key")) return !0;
3107
+ let child1 = node.constraint;
3108
+ if (null != child1 && walker.visitScalar(child1, node, "constraint")) return !0;
3109
+ let child2 = node.nameType;
3110
+ if (null != child2 && walker.visitScalar(child2, node, "nameType")) return !0;
3111
+ let child3 = node.typeAnnotation;
3112
+ return !!(null != child3 && walker.visitScalar(child3, node, "typeAnnotation"));
3113
+ },
3114
+ TSMethodSignature (node, walker) {
3115
+ let child0 = node.key;
3116
+ if (null != child0 && walker.visitScalar(child0, node, "key")) return !0;
3117
+ let child1 = node.typeParameters;
3118
+ if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return !0;
3119
+ let child2 = node.params;
3120
+ if (null != child2 && walker.visitList(child2, node, "params")) return !0;
3121
+ let child3 = node.returnType;
3122
+ return !!(null != child3 && walker.visitScalar(child3, node, "returnType"));
3123
+ },
3124
+ TSModuleBlock (node, walker) {
3125
+ let child0 = node.body;
3126
+ return !!(null != child0 && walker.visitList(child0, node, "body"));
3127
+ },
3128
+ TSModuleDeclaration (node, walker) {
3129
+ let child0 = node.id;
3130
+ if (null != child0 && walker.visitScalar(child0, node, "id")) return !0;
3131
+ let child1 = node.attributes;
3132
+ if (null != child1 && walker.visitScalar(child1, node, "attributes")) return !0;
3133
+ let child2 = node.body;
3134
+ return !!(null != child2 && walker.visitScalar(child2, node, "body"));
3135
+ },
3136
+ TSNamedTupleMember (node, walker) {
3137
+ let child0 = node.label;
3138
+ if (null != child0 && walker.visitScalar(child0, node, "label")) return !0;
3139
+ let child1 = node.elementType;
3140
+ return !!(null != child1 && walker.visitScalar(child1, node, "elementType"));
3141
+ },
3142
+ TSNamespaceExportDeclaration (node, walker) {
3143
+ let child0 = node.id;
3144
+ return !!(null != child0 && walker.visitScalar(child0, node, "id"));
3145
+ },
3146
+ TSNeverKeyword: null,
3147
+ TSNonNullExpression (node, walker) {
3148
+ let child0 = node.expression;
3149
+ return !!(null != child0 && walker.visitScalar(child0, node, "expression"));
3150
+ },
3151
+ TSNullKeyword: null,
3152
+ TSNumberKeyword: null,
3153
+ TSObjectKeyword: null,
3154
+ TSOptionalType (node, walker) {
3155
+ let child0 = node.typeAnnotation;
3156
+ return !!(null != child0 && walker.visitScalar(child0, node, "typeAnnotation"));
3157
+ },
3158
+ TSParameterProperty (node, walker) {
3159
+ let child0 = node.decorators;
3160
+ if (null != child0 && walker.visitListKnown(child0, node, "decorators", dispatchDecorator)) return !0;
3161
+ let child1 = node.parameter;
3162
+ return !!(null != child1 && walker.visitScalar(child1, node, "parameter"));
3163
+ },
3164
+ TSParenthesizedType (node, walker) {
3165
+ let child0 = node.typeAnnotation;
3166
+ return !!(null != child0 && walker.visitScalar(child0, node, "typeAnnotation"));
3167
+ },
3168
+ TSPropertySignature (node, walker) {
3169
+ let child0 = node.key;
3170
+ if (null != child0 && walker.visitScalar(child0, node, "key")) return !0;
3171
+ let child1 = node.typeAnnotation;
3172
+ return !!(null != child1 && walker.visitScalar(child1, node, "typeAnnotation"));
3173
+ },
3174
+ TSQualifiedName (node, walker) {
3175
+ let child0 = node.left;
3176
+ if (null != child0 && walker.visitScalar(child0, node, "left")) return !0;
3177
+ let child1 = node.right;
3178
+ return !!(null != child1 && walker.visitScalar(child1, node, "right"));
3179
+ },
3180
+ TSRestType (node, walker) {
3181
+ let child0 = node.typeAnnotation;
3182
+ return !!(null != child0 && walker.visitScalar(child0, node, "typeAnnotation"));
3183
+ },
3184
+ TSSatisfiesExpression (node, walker) {
3185
+ let child0 = node.expression;
3186
+ if (null != child0 && walker.visitScalar(child0, node, "expression")) return !0;
3187
+ let child1 = node.typeAnnotation;
3188
+ return !!(null != child1 && walker.visitScalar(child1, node, "typeAnnotation"));
3189
+ },
3190
+ TSStringKeyword: null,
3191
+ TSSymbolKeyword: null,
3192
+ TSTemplateLiteralType (node, walker) {
3193
+ let child0 = node.quasis;
3194
+ if (null != child0 && walker.visitListKnown(child0, node, "quasis", dispatchTemplateElement)) return !0;
3195
+ let child1 = node.types;
3196
+ return !!(null != child1 && walker.visitList(child1, node, "types"));
3197
+ },
3198
+ TSThisType: null,
3199
+ TSTupleType (node, walker) {
3200
+ let child0 = node.elementTypes;
3201
+ return !!(null != child0 && walker.visitList(child0, node, "elementTypes"));
3202
+ },
3203
+ TSTypeAliasDeclaration (node, walker) {
3204
+ let child0 = node.id;
3205
+ if (null != child0 && walker.visitScalar(child0, node, "id")) return !0;
3206
+ let child1 = node.typeParameters;
3207
+ if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return !0;
3208
+ let child2 = node.typeAnnotation;
3209
+ return !!(null != child2 && walker.visitScalar(child2, node, "typeAnnotation"));
3210
+ },
3211
+ TSTypeAnnotation (node, walker) {
3212
+ let child0 = node.typeAnnotation;
3213
+ return !!(null != child0 && walker.visitScalar(child0, node, "typeAnnotation"));
3214
+ },
3215
+ TSTypeAssertion (node, walker) {
3216
+ let child0 = node.typeAnnotation;
3217
+ if (null != child0 && walker.visitScalar(child0, node, "typeAnnotation")) return !0;
3218
+ let child1 = node.expression;
3219
+ return !!(null != child1 && walker.visitScalar(child1, node, "expression"));
3220
+ },
3221
+ TSTypeLiteral (node, walker) {
3222
+ let child0 = node.members;
3223
+ return !!(null != child0 && walker.visitList(child0, node, "members"));
3224
+ },
3225
+ TSTypeOperator (node, walker) {
3226
+ let child0 = node.typeAnnotation;
3227
+ return !!(null != child0 && walker.visitScalar(child0, node, "typeAnnotation"));
3228
+ },
3229
+ TSTypeParameter (node, walker) {
3230
+ let child0 = node.name;
3231
+ if (null != child0 && walker.visitScalar(child0, node, "name")) return !0;
3232
+ let child1 = node.constraint;
3233
+ if (null != child1 && walker.visitScalar(child1, node, "constraint")) return !0;
3234
+ let child2 = node.default;
3235
+ return !!(null != child2 && walker.visitScalar(child2, node, "default"));
3236
+ },
3237
+ TSTypeParameterDeclaration (node, walker) {
3238
+ let child0 = node.params;
3239
+ return !!(null != child0 && walker.visitListKnown(child0, node, "params", dispatchTSTypeParameter));
3240
+ },
3241
+ TSTypeParameterInstantiation (node, walker) {
3242
+ let child0 = node.params;
3243
+ return !!(null != child0 && walker.visitList(child0, node, "params"));
3244
+ },
3245
+ TSTypePredicate (node, walker) {
3246
+ let child0 = node.parameterName;
3247
+ if (null != child0 && walker.visitScalar(child0, node, "parameterName")) return !0;
3248
+ let child1 = node.typeAnnotation;
3249
+ return !!(null != child1 && walker.visitScalar(child1, node, "typeAnnotation"));
3250
+ },
3251
+ TSTypeQuery (node, walker) {
3252
+ let child0 = node.exprName;
3253
+ if (null != child0 && walker.visitScalar(child0, node, "exprName")) return !0;
3254
+ let child1 = node.typeArguments;
3255
+ return !!(null != child1 && walker.visitScalar(child1, node, "typeArguments"));
3256
+ },
3257
+ TSTypeReference (node, walker) {
3258
+ let child0 = node.typeName;
3259
+ if (null != child0 && walker.visitScalar(child0, node, "typeName")) return !0;
3260
+ let child1 = node.typeArguments;
3261
+ return !!(null != child1 && walker.visitScalar(child1, node, "typeArguments"));
3262
+ },
3263
+ TSUndefinedKeyword: null,
3264
+ TSUnionType (node, walker) {
3265
+ let child0 = node.types;
3266
+ return !!(null != child0 && walker.visitList(child0, node, "types"));
3267
+ },
3268
+ TSUnknownKeyword: null,
3269
+ TSVoidKeyword: null,
3270
+ TaggedTemplateExpression (node, walker) {
3271
+ let child0 = node.tag;
3272
+ if (null != child0 && walker.visitScalar(child0, node, "tag")) return !0;
3273
+ let child1 = node.typeArguments;
3274
+ if (null != child1 && walker.visitScalar(child1, node, "typeArguments")) return !0;
3275
+ let child2 = node.quasi;
3276
+ return !!(null != child2 && walker.visitScalar(child2, node, "quasi"));
3277
+ },
3278
+ TemplateElement: null,
3279
+ TemplateLiteral (node, walker) {
3280
+ let child0 = node.quasis;
3281
+ if (null != child0 && walker.visitListKnown(child0, node, "quasis", dispatchTemplateElement)) return !0;
3282
+ let child1 = node.expressions;
3283
+ return !!(null != child1 && walker.visitList(child1, node, "expressions"));
3284
+ },
3285
+ ThisExpression: null,
3286
+ ThrowStatement (node, walker) {
3287
+ let child0 = node.argument;
3288
+ return !!(null != child0 && walker.visitScalar(child0, node, "argument"));
3289
+ },
3290
+ TryStatement (node, walker) {
3291
+ let child0 = node.block;
3292
+ if (null != child0 && walker.visitScalar(child0, node, "block")) return !0;
3293
+ let child1 = node.handler;
3294
+ if (null != child1 && walker.visitScalar(child1, node, "handler")) return !0;
3295
+ let child2 = node.finalizer;
3296
+ return !!(null != child2 && walker.visitScalar(child2, node, "finalizer"));
3297
+ },
3298
+ UnaryExpression (node, walker) {
3299
+ let child0 = node.argument;
3300
+ return !!(null != child0 && walker.visitScalar(child0, node, "argument"));
3301
+ },
3302
+ UpdateExpression (node, walker) {
3303
+ let child0 = node.argument;
3304
+ return !!(null != child0 && walker.visitScalar(child0, node, "argument"));
3305
+ },
3306
+ VariableDeclaration (node, walker) {
3307
+ let child0 = node.declarations;
3308
+ return !!(null != child0 && walker.visitListKnown(child0, node, "declarations", dispatchVariableDeclarator));
3309
+ },
3310
+ VariableDeclarator (node, walker) {
3311
+ let child0 = node.id;
3312
+ if (null != child0 && walker.visitScalar(child0, node, "id")) return !0;
3313
+ let child1 = node.init;
3314
+ return !!(null != child1 && walker.visitScalar(child1, node, "init"));
3315
+ },
3316
+ WhileStatement (node, walker) {
3317
+ let child0 = node.test;
3318
+ if (null != child0 && walker.visitScalar(child0, node, "test")) return !0;
3319
+ let child1 = node.body;
3320
+ return !!(null != child1 && walker.visitScalar(child1, node, "body"));
3321
+ },
3322
+ WithStatement (node, walker) {
3323
+ let child0 = node.object;
3324
+ if (null != child0 && walker.visitScalar(child0, node, "object")) return !0;
3325
+ let child1 = node.body;
3326
+ return !!(null != child1 && walker.visitScalar(child1, node, "body"));
3327
+ },
3328
+ YieldExpression (node, walker) {
3329
+ let child0 = node.argument;
3330
+ return !!(null != child0 && walker.visitScalar(child0, node, "argument"));
2496
3331
  }
2497
- }
2498
- function isNode(value) {
2499
- return null !== value && 'object' == typeof value && 'type' in value && 'string' == typeof value.type;
3332
+ }, nodeWalkers = Object.assign(Object.create(null), {
3333
+ AccessorProperty: function(node, walker, parent, key, list, index) {
3334
+ let child0 = node.decorators;
3335
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
3336
+ let child1 = node.key;
3337
+ if (null != child1 && walker.visitScalar(child1, node, "key")) return index;
3338
+ let child2 = node.typeAnnotation;
3339
+ if (null != child2 && walker.visitScalar(child2, node, "typeAnnotation")) return index;
3340
+ let child3 = node.value;
3341
+ return null != child3 && walker.visitScalar(child3, node, "value") ? index : "AccessorProperty" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3342
+ },
3343
+ ArrayExpression: function(node, walker, parent, key, list, index) {
3344
+ let child0 = node.elements;
3345
+ return null != child0 && walker.visitList(child0, node, "elements") ? index : "ArrayExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3346
+ },
3347
+ ArrayPattern: function(node, walker, parent, key, list, index) {
3348
+ let child0 = node.decorators;
3349
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
3350
+ let child1 = node.elements;
3351
+ if (null != child1 && walker.visitList(child1, node, "elements")) return index;
3352
+ let child2 = node.typeAnnotation;
3353
+ return null != child2 && walker.visitScalar(child2, node, "typeAnnotation") ? index : "ArrayPattern" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3354
+ },
3355
+ ArrowFunctionExpression: function(node, walker, parent, key, list, index) {
3356
+ let child0 = node.typeParameters;
3357
+ if (null != child0 && walker.visitScalar(child0, node, "typeParameters")) return index;
3358
+ let child1 = node.params;
3359
+ if (null != child1 && walker.visitList(child1, node, "params")) return index;
3360
+ let child2 = node.returnType;
3361
+ if (null != child2 && walker.visitScalar(child2, node, "returnType")) return index;
3362
+ let child3 = node.body;
3363
+ return null != child3 && walker.visitScalar(child3, node, "body") ? index : "ArrowFunctionExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3364
+ },
3365
+ AssignmentExpression: function(node, walker, parent, key, list, index) {
3366
+ let child0 = node.left;
3367
+ if (null != child0 && walker.visitScalar(child0, node, "left")) return index;
3368
+ let child1 = node.right;
3369
+ return null != child1 && walker.visitScalar(child1, node, "right") ? index : "AssignmentExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3370
+ },
3371
+ AssignmentPattern: function(node, walker, parent, key, list, index) {
3372
+ let child0 = node.decorators;
3373
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
3374
+ let child1 = node.left;
3375
+ if (null != child1 && walker.visitScalar(child1, node, "left")) return index;
3376
+ let child2 = node.typeAnnotation;
3377
+ if (null != child2 && walker.visitScalar(child2, node, "typeAnnotation")) return index;
3378
+ let child3 = node.right;
3379
+ return null != child3 && walker.visitScalar(child3, node, "right") ? index : "AssignmentPattern" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3380
+ },
3381
+ AwaitExpression: function(node, walker, parent, key, list, index) {
3382
+ let child0 = node.argument;
3383
+ return null != child0 && walker.visitScalar(child0, node, "argument") ? index : "AwaitExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3384
+ },
3385
+ BinaryExpression: function(node, walker, parent, key, list, index) {
3386
+ let child0 = node.left;
3387
+ if (null != child0 && walker.visitScalar(child0, node, "left")) return index;
3388
+ let child1 = node.right;
3389
+ return null != child1 && walker.visitScalar(child1, node, "right") ? index : "BinaryExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3390
+ },
3391
+ BlockStatement: function(node, walker, parent, key, list, index) {
3392
+ let child0 = node.body;
3393
+ return null != child0 && walker.visitList(child0, node, "body") ? index : "BlockStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3394
+ },
3395
+ BreakStatement: function(node, walker, parent, key, list, index) {
3396
+ let child0 = node.label;
3397
+ return null != child0 && walker.visitScalar(child0, node, "label") ? index : "BreakStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3398
+ },
3399
+ CallExpression: function(node, walker, parent, key, list, index) {
3400
+ let child0 = node.callee;
3401
+ if (null != child0 && walker.visitScalar(child0, node, "callee")) return index;
3402
+ let child1 = node.typeArguments;
3403
+ if (null != child1 && walker.visitScalar(child1, node, "typeArguments")) return index;
3404
+ let child2 = node.arguments;
3405
+ return null != child2 && walker.visitList(child2, node, "arguments") ? index : "CallExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3406
+ },
3407
+ CatchClause: function(node, walker, parent, key, list, index) {
3408
+ let child0 = node.param;
3409
+ if (null != child0 && walker.visitScalar(child0, node, "param")) return index;
3410
+ let child1 = node.body;
3411
+ return null != child1 && walker.visitScalar(child1, node, "body") ? index : "CatchClause" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3412
+ },
3413
+ ChainExpression: function(node, walker, parent, key, list, index) {
3414
+ let child0 = node.expression;
3415
+ return null != child0 && walker.visitScalar(child0, node, "expression") ? index : "ChainExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3416
+ },
3417
+ ClassBody: function(node, walker, parent, key, list, index) {
3418
+ let child0 = node.body;
3419
+ return null != child0 && walker.visitList(child0, node, "body") ? index : "ClassBody" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3420
+ },
3421
+ ClassDeclaration: function(node, walker, parent, key, list, index) {
3422
+ let child0 = node.decorators;
3423
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
3424
+ let child1 = node.id;
3425
+ if (null != child1 && walker.visitScalar(child1, node, "id")) return index;
3426
+ let child2 = node.typeParameters;
3427
+ if (null != child2 && walker.visitScalar(child2, node, "typeParameters")) return index;
3428
+ let child3 = node.superClass;
3429
+ if (null != child3 && walker.visitScalar(child3, node, "superClass")) return index;
3430
+ let child4 = node.superTypeArguments;
3431
+ if (null != child4 && walker.visitScalar(child4, node, "superTypeArguments")) return index;
3432
+ let child5 = node.implements;
3433
+ if (null != child5 && walker.visitList(child5, node, "implements")) return index;
3434
+ let child6 = node.body;
3435
+ return null != child6 && walker.visitScalar(child6, node, "body") ? index : "ClassDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3436
+ },
3437
+ ClassExpression: function(node, walker, parent, key, list, index) {
3438
+ let child0 = node.decorators;
3439
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
3440
+ let child1 = node.id;
3441
+ if (null != child1 && walker.visitScalar(child1, node, "id")) return index;
3442
+ let child2 = node.typeParameters;
3443
+ if (null != child2 && walker.visitScalar(child2, node, "typeParameters")) return index;
3444
+ let child3 = node.superClass;
3445
+ if (null != child3 && walker.visitScalar(child3, node, "superClass")) return index;
3446
+ let child4 = node.superTypeArguments;
3447
+ if (null != child4 && walker.visitScalar(child4, node, "superTypeArguments")) return index;
3448
+ let child5 = node.implements;
3449
+ if (null != child5 && walker.visitList(child5, node, "implements")) return index;
3450
+ let child6 = node.body;
3451
+ return null != child6 && walker.visitScalar(child6, node, "body") ? index : "ClassExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3452
+ },
3453
+ ConditionalExpression: function(node, walker, parent, key, list, index) {
3454
+ let child0 = node.test;
3455
+ if (null != child0 && walker.visitScalar(child0, node, "test")) return index;
3456
+ let child1 = node.consequent;
3457
+ if (null != child1 && walker.visitScalar(child1, node, "consequent")) return index;
3458
+ let child2 = node.alternate;
3459
+ return null != child2 && walker.visitScalar(child2, node, "alternate") ? index : "ConditionalExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3460
+ },
3461
+ ContinueStatement: function(node, walker, parent, key, list, index) {
3462
+ let child0 = node.label;
3463
+ return null != child0 && walker.visitScalar(child0, node, "label") ? index : "ContinueStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3464
+ },
3465
+ DebuggerStatement: null,
3466
+ Decorator: function(node, walker, parent, key, list, index) {
3467
+ let child0 = node.expression;
3468
+ return null != child0 && walker.visitScalar(child0, node, "expression") ? index : "Decorator" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3469
+ },
3470
+ DoWhileStatement: function(node, walker, parent, key, list, index) {
3471
+ let child0 = node.body;
3472
+ if (null != child0 && walker.visitScalar(child0, node, "body")) return index;
3473
+ let child1 = node.test;
3474
+ return null != child1 && walker.visitScalar(child1, node, "test") ? index : "DoWhileStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3475
+ },
3476
+ EmptyStatement: null,
3477
+ ExportAllDeclaration: function(node, walker, parent, key, list, index) {
3478
+ let child0 = node.exported;
3479
+ if (null != child0 && walker.visitScalar(child0, node, "exported")) return index;
3480
+ let child1 = node.source;
3481
+ if (null != child1 && walker.visitScalar(child1, node, "source")) return index;
3482
+ let child2 = node.attributes;
3483
+ return null != child2 && walker.visitListKnown(child2, node, "attributes", dispatchImportAttribute) ? index : "ExportAllDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3484
+ },
3485
+ ExportDefaultDeclaration: function(node, walker, parent, key, list, index) {
3486
+ let child0 = node.declaration;
3487
+ return null != child0 && walker.visitScalar(child0, node, "declaration") ? index : "ExportDefaultDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3488
+ },
3489
+ ExportNamedDeclaration: function(node, walker, parent, key, list, index) {
3490
+ let child0 = node.declaration;
3491
+ if (null != child0 && walker.visitScalar(child0, node, "declaration")) return index;
3492
+ let child1 = node.specifiers;
3493
+ if (null != child1 && walker.visitListKnown(child1, node, "specifiers", dispatchExportSpecifier)) return index;
3494
+ let child2 = node.source;
3495
+ if (null != child2 && walker.visitScalar(child2, node, "source")) return index;
3496
+ let child3 = node.attributes;
3497
+ return null != child3 && walker.visitListKnown(child3, node, "attributes", dispatchImportAttribute) ? index : "ExportNamedDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3498
+ },
3499
+ ExportSpecifier: function(node, walker, parent, key, list, index) {
3500
+ let child0 = node.local;
3501
+ if (null != child0 && walker.visitScalar(child0, node, "local")) return index;
3502
+ let child1 = node.exported;
3503
+ return null != child1 && walker.visitScalar(child1, node, "exported") ? index : "ExportSpecifier" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3504
+ },
3505
+ ExpressionStatement: function(node, walker, parent, key, list, index) {
3506
+ let child0 = node.expression;
3507
+ return null != child0 && walker.visitScalar(child0, node, "expression") ? index : "ExpressionStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3508
+ },
3509
+ ForInStatement: function(node, walker, parent, key, list, index) {
3510
+ let child0 = node.left;
3511
+ if (null != child0 && walker.visitScalar(child0, node, "left")) return index;
3512
+ let child1 = node.right;
3513
+ if (null != child1 && walker.visitScalar(child1, node, "right")) return index;
3514
+ let child2 = node.body;
3515
+ return null != child2 && walker.visitScalar(child2, node, "body") ? index : "ForInStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3516
+ },
3517
+ ForOfStatement: function(node, walker, parent, key, list, index) {
3518
+ let child0 = node.left;
3519
+ if (null != child0 && walker.visitScalar(child0, node, "left")) return index;
3520
+ let child1 = node.right;
3521
+ if (null != child1 && walker.visitScalar(child1, node, "right")) return index;
3522
+ let child2 = node.body;
3523
+ return null != child2 && walker.visitScalar(child2, node, "body") ? index : "ForOfStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3524
+ },
3525
+ ForStatement: function(node, walker, parent, key, list, index) {
3526
+ let child0 = node.init;
3527
+ if (null != child0 && walker.visitScalar(child0, node, "init")) return index;
3528
+ let child1 = node.test;
3529
+ if (null != child1 && walker.visitScalar(child1, node, "test")) return index;
3530
+ let child2 = node.update;
3531
+ if (null != child2 && walker.visitScalar(child2, node, "update")) return index;
3532
+ let child3 = node.body;
3533
+ return null != child3 && walker.visitScalar(child3, node, "body") ? index : "ForStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3534
+ },
3535
+ FunctionDeclaration: function(node, walker, parent, key, list, index) {
3536
+ let child0 = node.id;
3537
+ if (null != child0 && walker.visitScalar(child0, node, "id")) return index;
3538
+ let child1 = node.typeParameters;
3539
+ if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return index;
3540
+ let child2 = node.params;
3541
+ if (null != child2 && walker.visitList(child2, node, "params")) return index;
3542
+ let child3 = node.returnType;
3543
+ if (null != child3 && walker.visitScalar(child3, node, "returnType")) return index;
3544
+ let child4 = node.body;
3545
+ return null != child4 && walker.visitScalar(child4, node, "body") ? index : "FunctionDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3546
+ },
3547
+ FunctionExpression: function(node, walker, parent, key, list, index) {
3548
+ let child0 = node.id;
3549
+ if (null != child0 && walker.visitScalar(child0, node, "id")) return index;
3550
+ let child1 = node.typeParameters;
3551
+ if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return index;
3552
+ let child2 = node.params;
3553
+ if (null != child2 && walker.visitList(child2, node, "params")) return index;
3554
+ let child3 = node.returnType;
3555
+ if (null != child3 && walker.visitScalar(child3, node, "returnType")) return index;
3556
+ let child4 = node.body;
3557
+ return null != child4 && walker.visitScalar(child4, node, "body") ? index : "FunctionExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3558
+ },
3559
+ Hashbang: null,
3560
+ Identifier: function(node, walker, parent, key, list, index) {
3561
+ let child0 = node.decorators;
3562
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
3563
+ let child1 = node.typeAnnotation;
3564
+ return null != child1 && walker.visitScalar(child1, node, "typeAnnotation") ? index : "Identifier" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3565
+ },
3566
+ IfStatement: function(node, walker, parent, key, list, index) {
3567
+ let child0 = node.test;
3568
+ if (null != child0 && walker.visitScalar(child0, node, "test")) return index;
3569
+ let child1 = node.consequent;
3570
+ if (null != child1 && walker.visitScalar(child1, node, "consequent")) return index;
3571
+ let child2 = node.alternate;
3572
+ return null != child2 && walker.visitScalar(child2, node, "alternate") ? index : "IfStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3573
+ },
3574
+ ImportAttribute: function(node, walker, parent, key, list, index) {
3575
+ let child0 = node.key;
3576
+ if (null != child0 && walker.visitScalar(child0, node, "key")) return index;
3577
+ let child1 = node.value;
3578
+ return null != child1 && walker.visitScalar(child1, node, "value") ? index : "ImportAttribute" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3579
+ },
3580
+ ImportDeclaration: function(node, walker, parent, key, list, index) {
3581
+ let child0 = node.specifiers;
3582
+ if (null != child0 && walker.visitList(child0, node, "specifiers")) return index;
3583
+ let child1 = node.source;
3584
+ if (null != child1 && walker.visitScalar(child1, node, "source")) return index;
3585
+ let child2 = node.attributes;
3586
+ return null != child2 && walker.visitListKnown(child2, node, "attributes", dispatchImportAttribute) ? index : "ImportDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3587
+ },
3588
+ ImportDefaultSpecifier: function(node, walker, parent, key, list, index) {
3589
+ let child0 = node.local;
3590
+ return null != child0 && walker.visitScalar(child0, node, "local") ? index : "ImportDefaultSpecifier" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3591
+ },
3592
+ ImportExpression: function(node, walker, parent, key, list, index) {
3593
+ let child0 = node.source;
3594
+ if (null != child0 && walker.visitScalar(child0, node, "source")) return index;
3595
+ let child1 = node.options;
3596
+ return null != child1 && walker.visitScalar(child1, node, "options") ? index : "ImportExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3597
+ },
3598
+ ImportNamespaceSpecifier: function(node, walker, parent, key, list, index) {
3599
+ let child0 = node.local;
3600
+ return null != child0 && walker.visitScalar(child0, node, "local") ? index : "ImportNamespaceSpecifier" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3601
+ },
3602
+ ImportSpecifier: function(node, walker, parent, key, list, index) {
3603
+ let child0 = node.imported;
3604
+ if (null != child0 && walker.visitScalar(child0, node, "imported")) return index;
3605
+ let child1 = node.local;
3606
+ return null != child1 && walker.visitScalar(child1, node, "local") ? index : "ImportSpecifier" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3607
+ },
3608
+ JSXAttribute: function(node, walker, parent, key, list, index) {
3609
+ let child0 = node.name;
3610
+ if (null != child0 && walker.visitScalar(child0, node, "name")) return index;
3611
+ let child1 = node.value;
3612
+ return null != child1 && walker.visitScalar(child1, node, "value") ? index : "JSXAttribute" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3613
+ },
3614
+ JSXClosingElement: function(node, walker, parent, key, list, index) {
3615
+ let child0 = node.name;
3616
+ return null != child0 && walker.visitScalar(child0, node, "name") ? index : "JSXClosingElement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3617
+ },
3618
+ JSXClosingFragment: null,
3619
+ JSXElement: function(node, walker, parent, key, list, index) {
3620
+ let child0 = node.openingElement;
3621
+ if (null != child0 && walker.visitScalar(child0, node, "openingElement")) return index;
3622
+ let child1 = node.children;
3623
+ if (null != child1 && walker.visitList(child1, node, "children")) return index;
3624
+ let child2 = node.closingElement;
3625
+ return null != child2 && walker.visitScalar(child2, node, "closingElement") ? index : "JSXElement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3626
+ },
3627
+ JSXEmptyExpression: null,
3628
+ JSXExpressionContainer: function(node, walker, parent, key, list, index) {
3629
+ let child0 = node.expression;
3630
+ return null != child0 && walker.visitScalar(child0, node, "expression") ? index : "JSXExpressionContainer" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3631
+ },
3632
+ JSXFragment: function(node, walker, parent, key, list, index) {
3633
+ let child0 = node.openingFragment;
3634
+ if (null != child0 && walker.visitScalar(child0, node, "openingFragment")) return index;
3635
+ let child1 = node.children;
3636
+ if (null != child1 && walker.visitList(child1, node, "children")) return index;
3637
+ let child2 = node.closingFragment;
3638
+ return null != child2 && walker.visitScalar(child2, node, "closingFragment") ? index : "JSXFragment" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3639
+ },
3640
+ JSXIdentifier: null,
3641
+ JSXMemberExpression: function(node, walker, parent, key, list, index) {
3642
+ let child0 = node.object;
3643
+ if (null != child0 && walker.visitScalar(child0, node, "object")) return index;
3644
+ let child1 = node.property;
3645
+ return null != child1 && walker.visitScalar(child1, node, "property") ? index : "JSXMemberExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3646
+ },
3647
+ JSXNamespacedName: function(node, walker, parent, key, list, index) {
3648
+ let child0 = node.namespace;
3649
+ if (null != child0 && walker.visitScalar(child0, node, "namespace")) return index;
3650
+ let child1 = node.name;
3651
+ return null != child1 && walker.visitScalar(child1, node, "name") ? index : "JSXNamespacedName" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3652
+ },
3653
+ JSXOpeningElement: function(node, walker, parent, key, list, index) {
3654
+ let child0 = node.name;
3655
+ if (null != child0 && walker.visitScalar(child0, node, "name")) return index;
3656
+ let child1 = node.typeArguments;
3657
+ if (null != child1 && walker.visitScalar(child1, node, "typeArguments")) return index;
3658
+ let child2 = node.attributes;
3659
+ return null != child2 && walker.visitList(child2, node, "attributes") ? index : "JSXOpeningElement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3660
+ },
3661
+ JSXOpeningFragment: null,
3662
+ JSXSpreadAttribute: function(node, walker, parent, key, list, index) {
3663
+ let child0 = node.argument;
3664
+ return null != child0 && walker.visitScalar(child0, node, "argument") ? index : "JSXSpreadAttribute" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3665
+ },
3666
+ JSXSpreadChild: function(node, walker, parent, key, list, index) {
3667
+ let child0 = node.expression;
3668
+ return null != child0 && walker.visitScalar(child0, node, "expression") ? index : "JSXSpreadChild" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3669
+ },
3670
+ JSXText: null,
3671
+ LabeledStatement: function(node, walker, parent, key, list, index) {
3672
+ let child0 = node.label;
3673
+ if (null != child0 && walker.visitScalar(child0, node, "label")) return index;
3674
+ let child1 = node.body;
3675
+ return null != child1 && walker.visitScalar(child1, node, "body") ? index : "LabeledStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3676
+ },
3677
+ Literal: null,
3678
+ LogicalExpression: function(node, walker, parent, key, list, index) {
3679
+ let child0 = node.left;
3680
+ if (null != child0 && walker.visitScalar(child0, node, "left")) return index;
3681
+ let child1 = node.right;
3682
+ return null != child1 && walker.visitScalar(child1, node, "right") ? index : "LogicalExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3683
+ },
3684
+ MemberExpression: function(node, walker, parent, key, list, index) {
3685
+ let child0 = node.object;
3686
+ if (null != child0 && walker.visitScalar(child0, node, "object")) return index;
3687
+ let child1 = node.property;
3688
+ return null != child1 && walker.visitScalar(child1, node, "property") ? index : "MemberExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3689
+ },
3690
+ MetaProperty: function(node, walker, parent, key, list, index) {
3691
+ let child0 = node.meta;
3692
+ if (null != child0 && walker.visitScalar(child0, node, "meta")) return index;
3693
+ let child1 = node.property;
3694
+ return null != child1 && walker.visitScalar(child1, node, "property") ? index : "MetaProperty" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3695
+ },
3696
+ MethodDefinition: function(node, walker, parent, key, list, index) {
3697
+ let child0 = node.decorators;
3698
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
3699
+ let child1 = node.key;
3700
+ if (null != child1 && walker.visitScalar(child1, node, "key")) return index;
3701
+ let child2 = node.value;
3702
+ return null != child2 && walker.visitScalar(child2, node, "value") ? index : "MethodDefinition" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3703
+ },
3704
+ NewExpression: function(node, walker, parent, key, list, index) {
3705
+ let child0 = node.callee;
3706
+ if (null != child0 && walker.visitScalar(child0, node, "callee")) return index;
3707
+ let child1 = node.typeArguments;
3708
+ if (null != child1 && walker.visitScalar(child1, node, "typeArguments")) return index;
3709
+ let child2 = node.arguments;
3710
+ return null != child2 && walker.visitList(child2, node, "arguments") ? index : "NewExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3711
+ },
3712
+ ObjectExpression: function(node, walker, parent, key, list, index) {
3713
+ let child0 = node.properties;
3714
+ return null != child0 && walker.visitList(child0, node, "properties") ? index : "ObjectExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3715
+ },
3716
+ ObjectPattern: function(node, walker, parent, key, list, index) {
3717
+ let child0 = node.decorators;
3718
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
3719
+ let child1 = node.properties;
3720
+ if (null != child1 && walker.visitList(child1, node, "properties")) return index;
3721
+ let child2 = node.typeAnnotation;
3722
+ return null != child2 && walker.visitScalar(child2, node, "typeAnnotation") ? index : "ObjectPattern" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3723
+ },
3724
+ ParenthesizedExpression: function(node, walker, parent, key, list, index) {
3725
+ let child0 = node.expression;
3726
+ return null != child0 && walker.visitScalar(child0, node, "expression") ? index : "ParenthesizedExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3727
+ },
3728
+ PrivateIdentifier: null,
3729
+ Program: function(node, walker, parent, key, list, index) {
3730
+ let child0 = node.hashbang;
3731
+ if (null != child0 && walker.visitScalar(child0, node, "hashbang")) return index;
3732
+ let child1 = node.body;
3733
+ return null != child1 && walker.visitList(child1, node, "body") ? index : "Program" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3734
+ },
3735
+ Property: function(node, walker, parent, key, list, index) {
3736
+ let child0 = node.key;
3737
+ if (null != child0 && walker.visitScalar(child0, node, "key")) return index;
3738
+ let child1 = node.value;
3739
+ return null != child1 && walker.visitScalar(child1, node, "value") ? index : "Property" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3740
+ },
3741
+ PropertyDefinition: function(node, walker, parent, key, list, index) {
3742
+ let child0 = node.decorators;
3743
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
3744
+ let child1 = node.key;
3745
+ if (null != child1 && walker.visitScalar(child1, node, "key")) return index;
3746
+ let child2 = node.typeAnnotation;
3747
+ if (null != child2 && walker.visitScalar(child2, node, "typeAnnotation")) return index;
3748
+ let child3 = node.value;
3749
+ return null != child3 && walker.visitScalar(child3, node, "value") ? index : "PropertyDefinition" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3750
+ },
3751
+ RestElement: function(node, walker, parent, key, list, index) {
3752
+ let child0 = node.decorators;
3753
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
3754
+ let child1 = node.argument;
3755
+ if (null != child1 && walker.visitScalar(child1, node, "argument")) return index;
3756
+ let child2 = node.typeAnnotation;
3757
+ return null != child2 && walker.visitScalar(child2, node, "typeAnnotation") ? index : "RestElement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3758
+ },
3759
+ ReturnStatement: function(node, walker, parent, key, list, index) {
3760
+ let child0 = node.argument;
3761
+ return null != child0 && walker.visitScalar(child0, node, "argument") ? index : "ReturnStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3762
+ },
3763
+ SequenceExpression: function(node, walker, parent, key, list, index) {
3764
+ let child0 = node.expressions;
3765
+ return null != child0 && walker.visitList(child0, node, "expressions") ? index : "SequenceExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3766
+ },
3767
+ SpreadElement: function(node, walker, parent, key, list, index) {
3768
+ let child0 = node.argument;
3769
+ return null != child0 && walker.visitScalar(child0, node, "argument") ? index : "SpreadElement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3770
+ },
3771
+ StaticBlock: function(node, walker, parent, key, list, index) {
3772
+ let child0 = node.body;
3773
+ return null != child0 && walker.visitList(child0, node, "body") ? index : "StaticBlock" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3774
+ },
3775
+ Super: null,
3776
+ SwitchCase: function(node, walker, parent, key, list, index) {
3777
+ let child0 = node.test;
3778
+ if (null != child0 && walker.visitScalar(child0, node, "test")) return index;
3779
+ let child1 = node.consequent;
3780
+ return null != child1 && walker.visitList(child1, node, "consequent") ? index : "SwitchCase" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3781
+ },
3782
+ SwitchStatement: function(node, walker, parent, key, list, index) {
3783
+ let child0 = node.discriminant;
3784
+ if (null != child0 && walker.visitScalar(child0, node, "discriminant")) return index;
3785
+ let child1 = node.cases;
3786
+ return null != child1 && walker.visitListKnown(child1, node, "cases", dispatchSwitchCase) ? index : "SwitchStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3787
+ },
3788
+ TSAbstractAccessorProperty: function(node, walker, parent, key, list, index) {
3789
+ let child0 = node.decorators;
3790
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
3791
+ let child1 = node.key;
3792
+ if (null != child1 && walker.visitScalar(child1, node, "key")) return index;
3793
+ let child2 = node.typeAnnotation;
3794
+ if (null != child2 && walker.visitScalar(child2, node, "typeAnnotation")) return index;
3795
+ let child3 = node.value;
3796
+ return null != child3 && walker.visitScalar(child3, node, "value") ? index : "TSAbstractAccessorProperty" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3797
+ },
3798
+ TSAbstractMethodDefinition: function(node, walker, parent, key, list, index) {
3799
+ let child0 = node.decorators;
3800
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
3801
+ let child1 = node.key;
3802
+ if (null != child1 && walker.visitScalar(child1, node, "key")) return index;
3803
+ let child2 = node.value;
3804
+ return null != child2 && walker.visitScalar(child2, node, "value") ? index : "TSAbstractMethodDefinition" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3805
+ },
3806
+ TSAbstractPropertyDefinition: function(node, walker, parent, key, list, index) {
3807
+ let child0 = node.decorators;
3808
+ if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
3809
+ let child1 = node.key;
3810
+ if (null != child1 && walker.visitScalar(child1, node, "key")) return index;
3811
+ let child2 = node.typeAnnotation;
3812
+ if (null != child2 && walker.visitScalar(child2, node, "typeAnnotation")) return index;
3813
+ let child3 = node.value;
3814
+ return null != child3 && walker.visitScalar(child3, node, "value") ? index : "TSAbstractPropertyDefinition" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3815
+ },
3816
+ TSAnyKeyword: null,
3817
+ TSArrayType: function(node, walker, parent, key, list, index) {
3818
+ let child0 = node.elementType;
3819
+ return null != child0 && walker.visitScalar(child0, node, "elementType") ? index : "TSArrayType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3820
+ },
3821
+ TSAsExpression: function(node, walker, parent, key, list, index) {
3822
+ let child0 = node.expression;
3823
+ if (null != child0 && walker.visitScalar(child0, node, "expression")) return index;
3824
+ let child1 = node.typeAnnotation;
3825
+ return null != child1 && walker.visitScalar(child1, node, "typeAnnotation") ? index : "TSAsExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3826
+ },
3827
+ TSBigIntKeyword: null,
3828
+ TSBooleanKeyword: null,
3829
+ TSCallSignatureDeclaration: function(node, walker, parent, key, list, index) {
3830
+ let child0 = node.typeParameters;
3831
+ if (null != child0 && walker.visitScalar(child0, node, "typeParameters")) return index;
3832
+ let child1 = node.params;
3833
+ if (null != child1 && walker.visitList(child1, node, "params")) return index;
3834
+ let child2 = node.returnType;
3835
+ return null != child2 && walker.visitScalar(child2, node, "returnType") ? index : "TSCallSignatureDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3836
+ },
3837
+ TSClassImplements: function(node, walker, parent, key, list, index) {
3838
+ let child0 = node.expression;
3839
+ if (null != child0 && walker.visitScalar(child0, node, "expression")) return index;
3840
+ let child1 = node.typeArguments;
3841
+ return null != child1 && walker.visitScalar(child1, node, "typeArguments") ? index : "TSClassImplements" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3842
+ },
3843
+ TSConditionalType: function(node, walker, parent, key, list, index) {
3844
+ let child0 = node.checkType;
3845
+ if (null != child0 && walker.visitScalar(child0, node, "checkType")) return index;
3846
+ let child1 = node.extendsType;
3847
+ if (null != child1 && walker.visitScalar(child1, node, "extendsType")) return index;
3848
+ let child2 = node.trueType;
3849
+ if (null != child2 && walker.visitScalar(child2, node, "trueType")) return index;
3850
+ let child3 = node.falseType;
3851
+ return null != child3 && walker.visitScalar(child3, node, "falseType") ? index : "TSConditionalType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3852
+ },
3853
+ TSConstructSignatureDeclaration: function(node, walker, parent, key, list, index) {
3854
+ let child0 = node.typeParameters;
3855
+ if (null != child0 && walker.visitScalar(child0, node, "typeParameters")) return index;
3856
+ let child1 = node.params;
3857
+ if (null != child1 && walker.visitList(child1, node, "params")) return index;
3858
+ let child2 = node.returnType;
3859
+ return null != child2 && walker.visitScalar(child2, node, "returnType") ? index : "TSConstructSignatureDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3860
+ },
3861
+ TSConstructorType: function(node, walker, parent, key, list, index) {
3862
+ let child0 = node.typeParameters;
3863
+ if (null != child0 && walker.visitScalar(child0, node, "typeParameters")) return index;
3864
+ let child1 = node.params;
3865
+ if (null != child1 && walker.visitList(child1, node, "params")) return index;
3866
+ let child2 = node.returnType;
3867
+ return null != child2 && walker.visitScalar(child2, node, "returnType") ? index : "TSConstructorType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3868
+ },
3869
+ TSDeclareFunction: function(node, walker, parent, key, list, index) {
3870
+ let child0 = node.id;
3871
+ if (null != child0 && walker.visitScalar(child0, node, "id")) return index;
3872
+ let child1 = node.typeParameters;
3873
+ if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return index;
3874
+ let child2 = node.params;
3875
+ if (null != child2 && walker.visitList(child2, node, "params")) return index;
3876
+ let child3 = node.returnType;
3877
+ if (null != child3 && walker.visitScalar(child3, node, "returnType")) return index;
3878
+ let child4 = node.body;
3879
+ return null != child4 && walker.visitScalar(child4, node, "body") ? index : "TSDeclareFunction" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3880
+ },
3881
+ TSEmptyBodyFunctionExpression: function(node, walker, parent, key, list, index) {
3882
+ let child0 = node.id;
3883
+ if (null != child0 && walker.visitScalar(child0, node, "id")) return index;
3884
+ let child1 = node.typeParameters;
3885
+ if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return index;
3886
+ let child2 = node.params;
3887
+ if (null != child2 && walker.visitList(child2, node, "params")) return index;
3888
+ let child3 = node.returnType;
3889
+ if (null != child3 && walker.visitScalar(child3, node, "returnType")) return index;
3890
+ let child4 = node.body;
3891
+ return null != child4 && walker.visitScalar(child4, node, "body") ? index : "TSEmptyBodyFunctionExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3892
+ },
3893
+ TSEnumBody: function(node, walker, parent, key, list, index) {
3894
+ let child0 = node.members;
3895
+ return null != child0 && walker.visitListKnown(child0, node, "members", dispatchTSEnumMember) ? index : "TSEnumBody" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3896
+ },
3897
+ TSEnumDeclaration: function(node, walker, parent, key, list, index) {
3898
+ let child0 = node.id;
3899
+ if (null != child0 && walker.visitScalar(child0, node, "id")) return index;
3900
+ let child1 = node.body;
3901
+ return null != child1 && walker.visitScalar(child1, node, "body") ? index : "TSEnumDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3902
+ },
3903
+ TSEnumMember: function(node, walker, parent, key, list, index) {
3904
+ let child0 = node.id;
3905
+ if (null != child0 && walker.visitScalar(child0, node, "id")) return index;
3906
+ let child1 = node.initializer;
3907
+ return null != child1 && walker.visitScalar(child1, node, "initializer") ? index : "TSEnumMember" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3908
+ },
3909
+ TSExportAssignment: function(node, walker, parent, key, list, index) {
3910
+ let child0 = node.expression;
3911
+ return null != child0 && walker.visitScalar(child0, node, "expression") ? index : "TSExportAssignment" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3912
+ },
3913
+ TSExternalModuleReference: function(node, walker, parent, key, list, index) {
3914
+ let child0 = node.expression;
3915
+ return null != child0 && walker.visitScalar(child0, node, "expression") ? index : "TSExternalModuleReference" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3916
+ },
3917
+ TSFunctionType: function(node, walker, parent, key, list, index) {
3918
+ let child0 = node.typeParameters;
3919
+ if (null != child0 && walker.visitScalar(child0, node, "typeParameters")) return index;
3920
+ let child1 = node.params;
3921
+ if (null != child1 && walker.visitList(child1, node, "params")) return index;
3922
+ let child2 = node.returnType;
3923
+ return null != child2 && walker.visitScalar(child2, node, "returnType") ? index : "TSFunctionType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3924
+ },
3925
+ TSImportEqualsDeclaration: function(node, walker, parent, key, list, index) {
3926
+ let child0 = node.id;
3927
+ if (null != child0 && walker.visitScalar(child0, node, "id")) return index;
3928
+ let child1 = node.moduleReference;
3929
+ return null != child1 && walker.visitScalar(child1, node, "moduleReference") ? index : "TSImportEqualsDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3930
+ },
3931
+ TSImportType: function(node, walker, parent, key, list, index) {
3932
+ let child0 = node.source;
3933
+ if (null != child0 && walker.visitScalar(child0, node, "source")) return index;
3934
+ let child1 = node.options;
3935
+ if (null != child1 && walker.visitScalar(child1, node, "options")) return index;
3936
+ let child2 = node.qualifier;
3937
+ if (null != child2 && walker.visitScalar(child2, node, "qualifier")) return index;
3938
+ let child3 = node.typeArguments;
3939
+ return null != child3 && walker.visitScalar(child3, node, "typeArguments") ? index : "TSImportType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3940
+ },
3941
+ TSIndexSignature: function(node, walker, parent, key, list, index) {
3942
+ let child0 = node.parameters;
3943
+ if (null != child0 && walker.visitList(child0, node, "parameters")) return index;
3944
+ let child1 = node.typeAnnotation;
3945
+ return null != child1 && walker.visitScalar(child1, node, "typeAnnotation") ? index : "TSIndexSignature" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3946
+ },
3947
+ TSIndexedAccessType: function(node, walker, parent, key, list, index) {
3948
+ let child0 = node.objectType;
3949
+ if (null != child0 && walker.visitScalar(child0, node, "objectType")) return index;
3950
+ let child1 = node.indexType;
3951
+ return null != child1 && walker.visitScalar(child1, node, "indexType") ? index : "TSIndexedAccessType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3952
+ },
3953
+ TSInferType: function(node, walker, parent, key, list, index) {
3954
+ let child0 = node.typeParameter;
3955
+ return null != child0 && walker.visitScalar(child0, node, "typeParameter") ? index : "TSInferType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3956
+ },
3957
+ TSInstantiationExpression: function(node, walker, parent, key, list, index) {
3958
+ let child0 = node.expression;
3959
+ if (null != child0 && walker.visitScalar(child0, node, "expression")) return index;
3960
+ let child1 = node.typeArguments;
3961
+ return null != child1 && walker.visitScalar(child1, node, "typeArguments") ? index : "TSInstantiationExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3962
+ },
3963
+ TSInterfaceBody: function(node, walker, parent, key, list, index) {
3964
+ let child0 = node.body;
3965
+ return null != child0 && walker.visitList(child0, node, "body") ? index : "TSInterfaceBody" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3966
+ },
3967
+ TSInterfaceDeclaration: function(node, walker, parent, key, list, index) {
3968
+ let child0 = node.id;
3969
+ if (null != child0 && walker.visitScalar(child0, node, "id")) return index;
3970
+ let child1 = node.typeParameters;
3971
+ if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return index;
3972
+ let child2 = node.extends;
3973
+ if (null != child2 && walker.visitListKnown(child2, node, "extends", dispatchTSInterfaceHeritage)) return index;
3974
+ let child3 = node.body;
3975
+ return null != child3 && walker.visitScalar(child3, node, "body") ? index : "TSInterfaceDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3976
+ },
3977
+ TSInterfaceHeritage: function(node, walker, parent, key, list, index) {
3978
+ let child0 = node.expression;
3979
+ if (null != child0 && walker.visitScalar(child0, node, "expression")) return index;
3980
+ let child1 = node.typeArguments;
3981
+ return null != child1 && walker.visitScalar(child1, node, "typeArguments") ? index : "TSInterfaceHeritage" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3982
+ },
3983
+ TSIntersectionType: function(node, walker, parent, key, list, index) {
3984
+ let child0 = node.types;
3985
+ return null != child0 && walker.visitList(child0, node, "types") ? index : "TSIntersectionType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3986
+ },
3987
+ TSIntrinsicKeyword: null,
3988
+ TSJSDocNonNullableType: function(node, walker, parent, key, list, index) {
3989
+ let child0 = node.typeAnnotation;
3990
+ return null != child0 && walker.visitScalar(child0, node, "typeAnnotation") ? index : "TSJSDocNonNullableType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3991
+ },
3992
+ TSJSDocNullableType: function(node, walker, parent, key, list, index) {
3993
+ let child0 = node.typeAnnotation;
3994
+ return null != child0 && walker.visitScalar(child0, node, "typeAnnotation") ? index : "TSJSDocNullableType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
3995
+ },
3996
+ TSJSDocUnknownType: null,
3997
+ TSLiteralType: function(node, walker, parent, key, list, index) {
3998
+ let child0 = node.literal;
3999
+ return null != child0 && walker.visitScalar(child0, node, "literal") ? index : "TSLiteralType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4000
+ },
4001
+ TSMappedType: function(node, walker, parent, key, list, index) {
4002
+ let child0 = node.key;
4003
+ if (null != child0 && walker.visitScalar(child0, node, "key")) return index;
4004
+ let child1 = node.constraint;
4005
+ if (null != child1 && walker.visitScalar(child1, node, "constraint")) return index;
4006
+ let child2 = node.nameType;
4007
+ if (null != child2 && walker.visitScalar(child2, node, "nameType")) return index;
4008
+ let child3 = node.typeAnnotation;
4009
+ return null != child3 && walker.visitScalar(child3, node, "typeAnnotation") ? index : "TSMappedType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4010
+ },
4011
+ TSMethodSignature: function(node, walker, parent, key, list, index) {
4012
+ let child0 = node.key;
4013
+ if (null != child0 && walker.visitScalar(child0, node, "key")) return index;
4014
+ let child1 = node.typeParameters;
4015
+ if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return index;
4016
+ let child2 = node.params;
4017
+ if (null != child2 && walker.visitList(child2, node, "params")) return index;
4018
+ let child3 = node.returnType;
4019
+ return null != child3 && walker.visitScalar(child3, node, "returnType") ? index : "TSMethodSignature" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4020
+ },
4021
+ TSModuleBlock: function(node, walker, parent, key, list, index) {
4022
+ let child0 = node.body;
4023
+ return null != child0 && walker.visitList(child0, node, "body") ? index : "TSModuleBlock" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4024
+ },
4025
+ TSModuleDeclaration: function(node, walker, parent, key, list, index) {
4026
+ let child0 = node.id;
4027
+ if (null != child0 && walker.visitScalar(child0, node, "id")) return index;
4028
+ let child1 = node.attributes;
4029
+ if (null != child1 && walker.visitScalar(child1, node, "attributes")) return index;
4030
+ let child2 = node.body;
4031
+ return null != child2 && walker.visitScalar(child2, node, "body") ? index : "TSModuleDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4032
+ },
4033
+ TSNamedTupleMember: function(node, walker, parent, key, list, index) {
4034
+ let child0 = node.label;
4035
+ if (null != child0 && walker.visitScalar(child0, node, "label")) return index;
4036
+ let child1 = node.elementType;
4037
+ return null != child1 && walker.visitScalar(child1, node, "elementType") ? index : "TSNamedTupleMember" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4038
+ },
4039
+ TSNamespaceExportDeclaration: function(node, walker, parent, key, list, index) {
4040
+ let child0 = node.id;
4041
+ return null != child0 && walker.visitScalar(child0, node, "id") ? index : "TSNamespaceExportDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4042
+ },
4043
+ TSNeverKeyword: null,
4044
+ TSNonNullExpression: function(node, walker, parent, key, list, index) {
4045
+ let child0 = node.expression;
4046
+ return null != child0 && walker.visitScalar(child0, node, "expression") ? index : "TSNonNullExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4047
+ },
4048
+ TSNullKeyword: null,
4049
+ TSNumberKeyword: null,
4050
+ TSObjectKeyword: null,
4051
+ TSOptionalType: function(node, walker, parent, key, list, index) {
4052
+ let child0 = node.typeAnnotation;
4053
+ return null != child0 && walker.visitScalar(child0, node, "typeAnnotation") ? index : "TSOptionalType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4054
+ },
4055
+ TSParameterProperty: function(node, walker, parent, key, list, index) {
4056
+ let child0 = node.decorators;
4057
+ if (null != child0 && walker.visitListKnown(child0, node, "decorators", dispatchDecorator)) return index;
4058
+ let child1 = node.parameter;
4059
+ return null != child1 && walker.visitScalar(child1, node, "parameter") ? index : "TSParameterProperty" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4060
+ },
4061
+ TSParenthesizedType: function(node, walker, parent, key, list, index) {
4062
+ let child0 = node.typeAnnotation;
4063
+ return null != child0 && walker.visitScalar(child0, node, "typeAnnotation") ? index : "TSParenthesizedType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4064
+ },
4065
+ TSPropertySignature: function(node, walker, parent, key, list, index) {
4066
+ let child0 = node.key;
4067
+ if (null != child0 && walker.visitScalar(child0, node, "key")) return index;
4068
+ let child1 = node.typeAnnotation;
4069
+ return null != child1 && walker.visitScalar(child1, node, "typeAnnotation") ? index : "TSPropertySignature" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4070
+ },
4071
+ TSQualifiedName: function(node, walker, parent, key, list, index) {
4072
+ let child0 = node.left;
4073
+ if (null != child0 && walker.visitScalar(child0, node, "left")) return index;
4074
+ let child1 = node.right;
4075
+ return null != child1 && walker.visitScalar(child1, node, "right") ? index : "TSQualifiedName" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4076
+ },
4077
+ TSRestType: function(node, walker, parent, key, list, index) {
4078
+ let child0 = node.typeAnnotation;
4079
+ return null != child0 && walker.visitScalar(child0, node, "typeAnnotation") ? index : "TSRestType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4080
+ },
4081
+ TSSatisfiesExpression: function(node, walker, parent, key, list, index) {
4082
+ let child0 = node.expression;
4083
+ if (null != child0 && walker.visitScalar(child0, node, "expression")) return index;
4084
+ let child1 = node.typeAnnotation;
4085
+ return null != child1 && walker.visitScalar(child1, node, "typeAnnotation") ? index : "TSSatisfiesExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4086
+ },
4087
+ TSStringKeyword: null,
4088
+ TSSymbolKeyword: null,
4089
+ TSTemplateLiteralType: function(node, walker, parent, key, list, index) {
4090
+ let child0 = node.quasis;
4091
+ if (null != child0 && walker.visitListKnown(child0, node, "quasis", dispatchTemplateElement)) return index;
4092
+ let child1 = node.types;
4093
+ return null != child1 && walker.visitList(child1, node, "types") ? index : "TSTemplateLiteralType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4094
+ },
4095
+ TSThisType: null,
4096
+ TSTupleType: function(node, walker, parent, key, list, index) {
4097
+ let child0 = node.elementTypes;
4098
+ return null != child0 && walker.visitList(child0, node, "elementTypes") ? index : "TSTupleType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4099
+ },
4100
+ TSTypeAliasDeclaration: function(node, walker, parent, key, list, index) {
4101
+ let child0 = node.id;
4102
+ if (null != child0 && walker.visitScalar(child0, node, "id")) return index;
4103
+ let child1 = node.typeParameters;
4104
+ if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return index;
4105
+ let child2 = node.typeAnnotation;
4106
+ return null != child2 && walker.visitScalar(child2, node, "typeAnnotation") ? index : "TSTypeAliasDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4107
+ },
4108
+ TSTypeAnnotation: function(node, walker, parent, key, list, index) {
4109
+ let child0 = node.typeAnnotation;
4110
+ return null != child0 && walker.visitScalar(child0, node, "typeAnnotation") ? index : "TSTypeAnnotation" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4111
+ },
4112
+ TSTypeAssertion: function(node, walker, parent, key, list, index) {
4113
+ let child0 = node.typeAnnotation;
4114
+ if (null != child0 && walker.visitScalar(child0, node, "typeAnnotation")) return index;
4115
+ let child1 = node.expression;
4116
+ return null != child1 && walker.visitScalar(child1, node, "expression") ? index : "TSTypeAssertion" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4117
+ },
4118
+ TSTypeLiteral: function(node, walker, parent, key, list, index) {
4119
+ let child0 = node.members;
4120
+ return null != child0 && walker.visitList(child0, node, "members") ? index : "TSTypeLiteral" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4121
+ },
4122
+ TSTypeOperator: function(node, walker, parent, key, list, index) {
4123
+ let child0 = node.typeAnnotation;
4124
+ return null != child0 && walker.visitScalar(child0, node, "typeAnnotation") ? index : "TSTypeOperator" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4125
+ },
4126
+ TSTypeParameter: function(node, walker, parent, key, list, index) {
4127
+ let child0 = node.name;
4128
+ if (null != child0 && walker.visitScalar(child0, node, "name")) return index;
4129
+ let child1 = node.constraint;
4130
+ if (null != child1 && walker.visitScalar(child1, node, "constraint")) return index;
4131
+ let child2 = node.default;
4132
+ return null != child2 && walker.visitScalar(child2, node, "default") ? index : "TSTypeParameter" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4133
+ },
4134
+ TSTypeParameterDeclaration: function(node, walker, parent, key, list, index) {
4135
+ let child0 = node.params;
4136
+ return null != child0 && walker.visitListKnown(child0, node, "params", dispatchTSTypeParameter) ? index : "TSTypeParameterDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4137
+ },
4138
+ TSTypeParameterInstantiation: function(node, walker, parent, key, list, index) {
4139
+ let child0 = node.params;
4140
+ return null != child0 && walker.visitList(child0, node, "params") ? index : "TSTypeParameterInstantiation" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4141
+ },
4142
+ TSTypePredicate: function(node, walker, parent, key, list, index) {
4143
+ let child0 = node.parameterName;
4144
+ if (null != child0 && walker.visitScalar(child0, node, "parameterName")) return index;
4145
+ let child1 = node.typeAnnotation;
4146
+ return null != child1 && walker.visitScalar(child1, node, "typeAnnotation") ? index : "TSTypePredicate" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4147
+ },
4148
+ TSTypeQuery: function(node, walker, parent, key, list, index) {
4149
+ let child0 = node.exprName;
4150
+ if (null != child0 && walker.visitScalar(child0, node, "exprName")) return index;
4151
+ let child1 = node.typeArguments;
4152
+ return null != child1 && walker.visitScalar(child1, node, "typeArguments") ? index : "TSTypeQuery" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4153
+ },
4154
+ TSTypeReference: function(node, walker, parent, key, list, index) {
4155
+ let child0 = node.typeName;
4156
+ if (null != child0 && walker.visitScalar(child0, node, "typeName")) return index;
4157
+ let child1 = node.typeArguments;
4158
+ return null != child1 && walker.visitScalar(child1, node, "typeArguments") ? index : "TSTypeReference" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4159
+ },
4160
+ TSUndefinedKeyword: null,
4161
+ TSUnionType: function(node, walker, parent, key, list, index) {
4162
+ let child0 = node.types;
4163
+ return null != child0 && walker.visitList(child0, node, "types") ? index : "TSUnionType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4164
+ },
4165
+ TSUnknownKeyword: null,
4166
+ TSVoidKeyword: null,
4167
+ TaggedTemplateExpression: function(node, walker, parent, key, list, index) {
4168
+ let child0 = node.tag;
4169
+ if (null != child0 && walker.visitScalar(child0, node, "tag")) return index;
4170
+ let child1 = node.typeArguments;
4171
+ if (null != child1 && walker.visitScalar(child1, node, "typeArguments")) return index;
4172
+ let child2 = node.quasi;
4173
+ return null != child2 && walker.visitScalar(child2, node, "quasi") ? index : "TaggedTemplateExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4174
+ },
4175
+ TemplateElement: null,
4176
+ TemplateLiteral: function(node, walker, parent, key, list, index) {
4177
+ let child0 = node.quasis;
4178
+ if (null != child0 && walker.visitListKnown(child0, node, "quasis", dispatchTemplateElement)) return index;
4179
+ let child1 = node.expressions;
4180
+ return null != child1 && walker.visitList(child1, node, "expressions") ? index : "TemplateLiteral" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4181
+ },
4182
+ ThisExpression: null,
4183
+ ThrowStatement: function(node, walker, parent, key, list, index) {
4184
+ let child0 = node.argument;
4185
+ return null != child0 && walker.visitScalar(child0, node, "argument") ? index : "ThrowStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4186
+ },
4187
+ TryStatement: function(node, walker, parent, key, list, index) {
4188
+ let child0 = node.block;
4189
+ if (null != child0 && walker.visitScalar(child0, node, "block")) return index;
4190
+ let child1 = node.handler;
4191
+ if (null != child1 && walker.visitScalar(child1, node, "handler")) return index;
4192
+ let child2 = node.finalizer;
4193
+ return null != child2 && walker.visitScalar(child2, node, "finalizer") ? index : "TryStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4194
+ },
4195
+ UnaryExpression: function(node, walker, parent, key, list, index) {
4196
+ let child0 = node.argument;
4197
+ return null != child0 && walker.visitScalar(child0, node, "argument") ? index : "UnaryExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4198
+ },
4199
+ UpdateExpression: function(node, walker, parent, key, list, index) {
4200
+ let child0 = node.argument;
4201
+ return null != child0 && walker.visitScalar(child0, node, "argument") ? index : "UpdateExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4202
+ },
4203
+ VariableDeclaration: function(node, walker, parent, key, list, index) {
4204
+ let child0 = node.declarations;
4205
+ return null != child0 && walker.visitListKnown(child0, node, "declarations", dispatchVariableDeclarator) ? index : "VariableDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4206
+ },
4207
+ VariableDeclarator: function(node, walker, parent, key, list, index) {
4208
+ let child0 = node.id;
4209
+ if (null != child0 && walker.visitScalar(child0, node, "id")) return index;
4210
+ let child1 = node.init;
4211
+ return null != child1 && walker.visitScalar(child1, node, "init") ? index : "VariableDeclarator" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4212
+ },
4213
+ WhileStatement: function(node, walker, parent, key, list, index) {
4214
+ let child0 = node.test;
4215
+ if (null != child0 && walker.visitScalar(child0, node, "test")) return index;
4216
+ let child1 = node.body;
4217
+ return null != child1 && walker.visitScalar(child1, node, "body") ? index : "WhileStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4218
+ },
4219
+ WithStatement: function(node, walker, parent, key, list, index) {
4220
+ let child0 = node.object;
4221
+ if (null != child0 && walker.visitScalar(child0, node, "object")) return index;
4222
+ let child1 = node.body;
4223
+ return null != child1 && walker.visitScalar(child1, node, "body") ? index : "WithStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4224
+ },
4225
+ YieldExpression: function(node, walker, parent, key, list, index) {
4226
+ let child0 = node.argument;
4227
+ return null != child0 && walker.visitScalar(child0, node, "argument") ? index : "YieldExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
4228
+ }
4229
+ }), dispatchDecorator = function(node, walker, parent, key, list, index, walkers) {
4230
+ let type = node.type;
4231
+ if ("Decorator" !== type) {
4232
+ if ("string" != typeof type) throw TypeError(`Unsupported AST node type: ${type}`);
4233
+ let fallback = walkers[type];
4234
+ if (void 0 === fallback) throw TypeError(`Unsupported AST node type: ${type}`);
4235
+ return null === fallback ? index : fallback(node, walker, parent, key, list, index);
4236
+ }
4237
+ let visit = walkers.Decorator;
4238
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4239
+ }, dispatchExportSpecifier = function(node, walker, parent, key, list, index, walkers) {
4240
+ let type = node.type;
4241
+ if ("ExportSpecifier" !== type) {
4242
+ if ("string" != typeof type) throw TypeError(`Unsupported AST node type: ${type}`);
4243
+ let fallback = walkers[type];
4244
+ if (void 0 === fallback) throw TypeError(`Unsupported AST node type: ${type}`);
4245
+ return null === fallback ? index : fallback(node, walker, parent, key, list, index);
4246
+ }
4247
+ let visit = walkers.ExportSpecifier;
4248
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4249
+ }, dispatchImportAttribute = function(node, walker, parent, key, list, index, walkers) {
4250
+ let type = node.type;
4251
+ if ("ImportAttribute" !== type) {
4252
+ if ("string" != typeof type) throw TypeError(`Unsupported AST node type: ${type}`);
4253
+ let fallback = walkers[type];
4254
+ if (void 0 === fallback) throw TypeError(`Unsupported AST node type: ${type}`);
4255
+ return null === fallback ? index : fallback(node, walker, parent, key, list, index);
4256
+ }
4257
+ let visit = walkers.ImportAttribute;
4258
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4259
+ }, dispatchSwitchCase = function(node, walker, parent, key, list, index, walkers) {
4260
+ let type = node.type;
4261
+ if ("SwitchCase" !== type) {
4262
+ if ("string" != typeof type) throw TypeError(`Unsupported AST node type: ${type}`);
4263
+ let fallback = walkers[type];
4264
+ if (void 0 === fallback) throw TypeError(`Unsupported AST node type: ${type}`);
4265
+ return null === fallback ? index : fallback(node, walker, parent, key, list, index);
4266
+ }
4267
+ let visit = walkers.SwitchCase;
4268
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4269
+ }, dispatchTSEnumMember = function(node, walker, parent, key, list, index, walkers) {
4270
+ let type = node.type;
4271
+ if ("TSEnumMember" !== type) {
4272
+ if ("string" != typeof type) throw TypeError(`Unsupported AST node type: ${type}`);
4273
+ let fallback = walkers[type];
4274
+ if (void 0 === fallback) throw TypeError(`Unsupported AST node type: ${type}`);
4275
+ return null === fallback ? index : fallback(node, walker, parent, key, list, index);
4276
+ }
4277
+ let visit = walkers.TSEnumMember;
4278
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4279
+ }, dispatchTSInterfaceHeritage = function(node, walker, parent, key, list, index, walkers) {
4280
+ let type = node.type;
4281
+ if ("TSInterfaceHeritage" !== type) {
4282
+ if ("string" != typeof type) throw TypeError(`Unsupported AST node type: ${type}`);
4283
+ let fallback = walkers[type];
4284
+ if (void 0 === fallback) throw TypeError(`Unsupported AST node type: ${type}`);
4285
+ return null === fallback ? index : fallback(node, walker, parent, key, list, index);
4286
+ }
4287
+ let visit = walkers.TSInterfaceHeritage;
4288
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4289
+ }, dispatchTSTypeParameter = function(node, walker, parent, key, list, index, walkers) {
4290
+ let type = node.type;
4291
+ if ("TSTypeParameter" !== type) {
4292
+ if ("string" != typeof type) throw TypeError(`Unsupported AST node type: ${type}`);
4293
+ let fallback = walkers[type];
4294
+ if (void 0 === fallback) throw TypeError(`Unsupported AST node type: ${type}`);
4295
+ return null === fallback ? index : fallback(node, walker, parent, key, list, index);
4296
+ }
4297
+ let visit = walkers.TSTypeParameter;
4298
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4299
+ }, dispatchTemplateElement = function(node, walker, parent, key, list, index, walkers) {
4300
+ let type = node.type;
4301
+ if ("TemplateElement" !== type) {
4302
+ if ("string" != typeof type) throw TypeError(`Unsupported AST node type: ${type}`);
4303
+ let fallback = walkers[type];
4304
+ if (void 0 === fallback) throw TypeError(`Unsupported AST node type: ${type}`);
4305
+ return null === fallback ? index : fallback(node, walker, parent, key, list, index);
4306
+ }
4307
+ let visit = walkers.TemplateElement;
4308
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4309
+ }, dispatchVariableDeclarator = function(node, walker, parent, key, list, index, walkers) {
4310
+ let type = node.type;
4311
+ if ("VariableDeclarator" !== type) {
4312
+ if ("string" != typeof type) throw TypeError(`Unsupported AST node type: ${type}`);
4313
+ let fallback = walkers[type];
4314
+ if (void 0 === fallback) throw TypeError(`Unsupported AST node type: ${type}`);
4315
+ return null === fallback ? index : fallback(node, walker, parent, key, list, index);
4316
+ }
4317
+ let visit = walkers.VariableDeclarator;
4318
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4319
+ }, baseDispatch = Object.create(null);
4320
+ for (let [type, children] of Object.entries(childVisitors))baseDispatch[type] = {
4321
+ children,
4322
+ enter: null,
4323
+ leave: null
4324
+ };
4325
+ let aliases = {
4326
+ Function: [
4327
+ "FunctionDeclaration",
4328
+ "FunctionExpression",
4329
+ "ArrowFunctionExpression",
4330
+ "TSDeclareFunction",
4331
+ "TSEmptyBodyFunctionExpression"
4332
+ ],
4333
+ Class: [
4334
+ "ClassDeclaration",
4335
+ "ClassExpression"
4336
+ ]
4337
+ }, owns = (object, key)=>Object.prototype.hasOwnProperty.call(object, key), isNodeType = (type)=>void 0 !== baseDispatch[type];
4338
+ function assertNode(node) {
4339
+ if (!node || "object" != typeof node || !isNodeType(node.type)) throw TypeError(`Unsupported AST node type: ${node?.type}`);
4340
+ }
4341
+ function assertSync(result) {
4342
+ if (null != result && "function" == typeof result.then) throw Promise.resolve(result).catch(()=>{}), TypeError("AST hooks must be synchronous");
4343
+ if (void 0 !== result) throw TypeError("AST hooks must return undefined; use the context to edit nodes");
4344
+ }
4345
+ function walkEnter(node, walker, parent, key, list, index) {
4346
+ return walker.visitHooks(node, parent, key, list, index);
4347
+ }
4348
+ function walkLeave(node, walker, parent, key, list, index) {
4349
+ return walker.visitLeaveHooks(node, parent, key, list, index);
4350
+ }
4351
+ class WalkContext {
4352
+ #frame;
4353
+ #phase;
4354
+ #state;
4355
+ #ancestors = [];
4356
+ #depth = 0;
4357
+ #dispatch;
4358
+ #walkers;
4359
+ #globalEnter;
4360
+ #globalLeave;
4361
+ #storage = {
4362
+ node: null,
4363
+ parent: null,
4364
+ key: null,
4365
+ list: null,
4366
+ index: 0,
4367
+ after: 0,
4368
+ flags: 0
4369
+ };
4370
+ stopped = !1;
4371
+ constructor(state, compiled){
4372
+ this.#state = state, this.#dispatch = compiled.dispatch, this.#walkers = compiled.walkers, this.#globalEnter = compiled.globalEnter, this.#globalLeave = compiled.globalLeave;
4373
+ }
4374
+ #check() {
4375
+ let frame = this.#frame;
4376
+ if (void 0 === frame) throw Error("Walk context is only valid during its hook");
4377
+ return frame;
4378
+ }
4379
+ #editable() {
4380
+ let frame = this.#check();
4381
+ if (2 & frame.flags) throw Error("The current node has been removed");
4382
+ if (!frame.parent) throw Error("Cannot structurally edit the walk root");
4383
+ if (frame.list && frame.parent[frame.key] !== frame.list || (frame.list ? frame.list[frame.index] : frame.parent[frame.key]) !== frame.node) throw Error("The current node's container was changed outside the walk context");
4384
+ return frame;
4385
+ }
4386
+ get node() {
4387
+ return this.#check().node;
4388
+ }
4389
+ get parent() {
4390
+ return this.#check().parent;
4391
+ }
4392
+ get key() {
4393
+ return this.#check().key;
4394
+ }
4395
+ get index() {
4396
+ let frame = this.#check();
4397
+ return 2 & frame.flags || !frame.list ? null : frame.index;
4398
+ }
4399
+ get state() {
4400
+ return this.#check(), this.#state;
4401
+ }
4402
+ ancestors() {
4403
+ return this.#check(), this.#ancestors.slice(0, this.#depth);
4404
+ }
4405
+ skip() {
4406
+ if (this.#check(), "enter" !== this.#phase) throw Error("skip() is only valid in enter hooks");
4407
+ this.#frame.flags |= 1;
4408
+ }
4409
+ stop() {
4410
+ this.#check(), this.stopped = !0;
4411
+ }
4412
+ replace(node) {
4413
+ let frame = this.#editable();
4414
+ assertNode(node), node !== frame.node && (null == node.start && (node.start = frame.node.start), null == node.end && (node.end = frame.node.end), frame.list ? frame.list[frame.index] = node : frame.parent[frame.key] = node, frame.node = node, frame.flags |= 4);
4415
+ }
4416
+ remove() {
4417
+ let frame = this.#editable();
4418
+ if (!frame.list) throw Error("Removal requires an array element");
4419
+ frame.list.splice(frame.index, 1), frame.index--, frame.flags |= 2;
4420
+ }
4421
+ #insert(nodes, after) {
4422
+ let count, frame = this.#editable();
4423
+ if (!frame.list) throw Error("Insertion requires an array element");
4424
+ let index = frame.index + (after ? 1 + frame.after : 0);
4425
+ Array.isArray(nodes) ? (nodes.forEach(assertNode), frame.list.splice(index, 0, ...nodes), count = nodes.length) : (assertNode(nodes), frame.list.splice(index, 0, nodes), count = 1), after ? frame.after += count : frame.index += count;
4426
+ }
4427
+ insertBefore(nodes) {
4428
+ this.#insert(nodes, !1);
4429
+ }
4430
+ insertAfter(nodes) {
4431
+ this.#insert(nodes, !0);
4432
+ }
4433
+ invoke(handlers, frame, phase) {
4434
+ if (this.#frame = frame, this.#phase = phase, "function" == typeof handlers) assertSync(handlers(frame.node, this));
4435
+ else for(let i = 0; i < handlers.length && (assertSync((0, handlers[i])(frame.node, this)), !this.stopped && !(6 & frame.flags) && ("enter" !== phase || !(1 & frame.flags))); i++);
4436
+ this.#frame = void 0;
4437
+ }
4438
+ reset() {
4439
+ this.#frame = void 0, this.#ancestors.length = 0, this.#depth = 0, this.#storage.node = this.#storage.parent = this.#storage.list = null, this.#dispatch = this.#walkers = this.#globalEnter = this.#globalLeave = void 0;
4440
+ }
4441
+ #prepare(node, parent, key, list, index, after) {
4442
+ let frame = this.#storage;
4443
+ frame.node = node, frame.parent = parent, frame.key = key, frame.list = list, frame.index = index, frame.after = after, frame.flags = 0;
4444
+ }
4445
+ visitScalar(value, parent, key) {
4446
+ return this.#ancestors[this.#depth++] = parent, this.visit(value, parent, key, null, 0), this.#depth--, this.stopped;
4447
+ }
4448
+ visitListKnown(value, parent, key, dispatch) {
4449
+ this.#ancestors[this.#depth++] = parent;
4450
+ for(let i = 0; i < value.length; i++){
4451
+ let child = value[i];
4452
+ if (null != child && ("object" != typeof child && assertNode(child), i = dispatch(child, this, parent, key, value, i, this.#walkers)), this.stopped) return !0;
4453
+ }
4454
+ return this.#depth--, this.stopped;
4455
+ }
4456
+ visitList(value, parent, key) {
4457
+ this.#ancestors[this.#depth++] = parent;
4458
+ for(let i = 0; i < value.length; i++){
4459
+ let child = value[i];
4460
+ if (null != child && (i = this.visit(child, parent, key, value, i)), this.stopped) return !0;
4461
+ }
4462
+ return this.#depth--, this.stopped;
4463
+ }
4464
+ visit(node, parent, key, list, index) {
4465
+ return "object" != typeof node && assertNode(node), function(node, walker, parent, key, list, index, walkers) {
4466
+ let type = node.type;
4467
+ if ("Identifier" === type) {
4468
+ let visit = walkers.Identifier;
4469
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4470
+ }
4471
+ switch("string" == typeof type ? type.length : -1){
4472
+ case 5:
4473
+ if ("Super" === type) {
4474
+ let visit = walkers.Super;
4475
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4476
+ }
4477
+ break;
4478
+ case 7:
4479
+ switch(type){
4480
+ case "JSXText":
4481
+ {
4482
+ let visit = walkers.JSXText;
4483
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4484
+ }
4485
+ case "Literal":
4486
+ {
4487
+ let visit = walkers.Literal;
4488
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4489
+ }
4490
+ case "Program":
4491
+ {
4492
+ let visit = walkers.Program;
4493
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4494
+ }
4495
+ }
4496
+ break;
4497
+ case 8:
4498
+ switch(type){
4499
+ case "Hashbang":
4500
+ {
4501
+ let visit = walkers.Hashbang;
4502
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4503
+ }
4504
+ case "Property":
4505
+ {
4506
+ let visit = walkers.Property;
4507
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4508
+ }
4509
+ }
4510
+ break;
4511
+ case 9:
4512
+ switch(type){
4513
+ case "ClassBody":
4514
+ {
4515
+ let visit = walkers.ClassBody;
4516
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4517
+ }
4518
+ case "Decorator":
4519
+ {
4520
+ let visit = walkers.Decorator;
4521
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4522
+ }
4523
+ }
4524
+ break;
4525
+ case 10:
4526
+ switch(type){
4527
+ case "JSXElement":
4528
+ {
4529
+ let visit = walkers.JSXElement;
4530
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4531
+ }
4532
+ case "SwitchCase":
4533
+ {
4534
+ let visit = walkers.SwitchCase;
4535
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4536
+ }
4537
+ case "TSEnumBody":
4538
+ {
4539
+ let visit = walkers.TSEnumBody;
4540
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4541
+ }
4542
+ case "TSRestType":
4543
+ {
4544
+ let visit = walkers.TSRestType;
4545
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4546
+ }
4547
+ case "TSThisType":
4548
+ {
4549
+ let visit = walkers.TSThisType;
4550
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4551
+ }
4552
+ }
4553
+ break;
4554
+ case 11:
4555
+ switch(type){
4556
+ case "CatchClause":
4557
+ {
4558
+ let visit = walkers.CatchClause;
4559
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4560
+ }
4561
+ case "IfStatement":
4562
+ {
4563
+ let visit = walkers.IfStatement;
4564
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4565
+ }
4566
+ case "JSXFragment":
4567
+ {
4568
+ let visit = walkers.JSXFragment;
4569
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4570
+ }
4571
+ case "RestElement":
4572
+ {
4573
+ let visit = walkers.RestElement;
4574
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4575
+ }
4576
+ case "StaticBlock":
4577
+ {
4578
+ let visit = walkers.StaticBlock;
4579
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4580
+ }
4581
+ case "TSArrayType":
4582
+ {
4583
+ let visit = walkers.TSArrayType;
4584
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4585
+ }
4586
+ case "TSInferType":
4587
+ {
4588
+ let visit = walkers.TSInferType;
4589
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4590
+ }
4591
+ case "TSTupleType":
4592
+ {
4593
+ let visit = walkers.TSTupleType;
4594
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4595
+ }
4596
+ case "TSTypeQuery":
4597
+ {
4598
+ let visit = walkers.TSTypeQuery;
4599
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4600
+ }
4601
+ case "TSUnionType":
4602
+ {
4603
+ let visit = walkers.TSUnionType;
4604
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4605
+ }
4606
+ }
4607
+ break;
4608
+ case 12:
4609
+ switch(type){
4610
+ case "ArrayPattern":
4611
+ {
4612
+ let visit = walkers.ArrayPattern;
4613
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4614
+ }
4615
+ case "ForStatement":
4616
+ {
4617
+ let visit = walkers.ForStatement;
4618
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4619
+ }
4620
+ case "JSXAttribute":
4621
+ {
4622
+ let visit = walkers.JSXAttribute;
4623
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4624
+ }
4625
+ case "MetaProperty":
4626
+ {
4627
+ let visit = walkers.MetaProperty;
4628
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4629
+ }
4630
+ case "TSAnyKeyword":
4631
+ {
4632
+ let visit = walkers.TSAnyKeyword;
4633
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4634
+ }
4635
+ case "TSEnumMember":
4636
+ {
4637
+ let visit = walkers.TSEnumMember;
4638
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4639
+ }
4640
+ case "TSImportType":
4641
+ {
4642
+ let visit = walkers.TSImportType;
4643
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4644
+ }
4645
+ case "TSMappedType":
4646
+ {
4647
+ let visit = walkers.TSMappedType;
4648
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4649
+ }
4650
+ case "TryStatement":
4651
+ {
4652
+ let visit = walkers.TryStatement;
4653
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4654
+ }
4655
+ }
4656
+ break;
4657
+ case 13:
4658
+ switch(type){
4659
+ case "JSXIdentifier":
4660
+ {
4661
+ let visit = walkers.JSXIdentifier;
4662
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4663
+ }
4664
+ case "NewExpression":
4665
+ {
4666
+ let visit = walkers.NewExpression;
4667
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4668
+ }
4669
+ case "ObjectPattern":
4670
+ {
4671
+ let visit = walkers.ObjectPattern;
4672
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4673
+ }
4674
+ case "SpreadElement":
4675
+ {
4676
+ let visit = walkers.SpreadElement;
4677
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4678
+ }
4679
+ case "TSLiteralType":
4680
+ {
4681
+ let visit = walkers.TSLiteralType;
4682
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4683
+ }
4684
+ case "TSModuleBlock":
4685
+ {
4686
+ let visit = walkers.TSModuleBlock;
4687
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4688
+ }
4689
+ case "TSNullKeyword":
4690
+ {
4691
+ let visit = walkers.TSNullKeyword;
4692
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4693
+ }
4694
+ case "TSTypeLiteral":
4695
+ {
4696
+ let visit = walkers.TSTypeLiteral;
4697
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4698
+ }
4699
+ case "TSVoidKeyword":
4700
+ {
4701
+ let visit = walkers.TSVoidKeyword;
4702
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4703
+ }
4704
+ case "WithStatement":
4705
+ {
4706
+ let visit = walkers.WithStatement;
4707
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4708
+ }
4709
+ }
4710
+ break;
4711
+ case 14:
4712
+ switch(type){
4713
+ case "BlockStatement":
4714
+ {
4715
+ let visit = walkers.BlockStatement;
4716
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4717
+ }
4718
+ case "BreakStatement":
4719
+ {
4720
+ let visit = walkers.BreakStatement;
4721
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4722
+ }
4723
+ case "CallExpression":
4724
+ {
4725
+ let visit = walkers.CallExpression;
4726
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4727
+ }
4728
+ case "EmptyStatement":
4729
+ {
4730
+ let visit = walkers.EmptyStatement;
4731
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4732
+ }
4733
+ case "ForInStatement":
4734
+ {
4735
+ let visit = walkers.ForInStatement;
4736
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4737
+ }
4738
+ case "ForOfStatement":
4739
+ {
4740
+ let visit = walkers.ForOfStatement;
4741
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4742
+ }
4743
+ case "JSXSpreadChild":
4744
+ {
4745
+ let visit = walkers.JSXSpreadChild;
4746
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4747
+ }
4748
+ case "TSAsExpression":
4749
+ {
4750
+ let visit = walkers.TSAsExpression;
4751
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4752
+ }
4753
+ case "TSFunctionType":
4754
+ {
4755
+ let visit = walkers.TSFunctionType;
4756
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4757
+ }
4758
+ case "TSNeverKeyword":
4759
+ {
4760
+ let visit = walkers.TSNeverKeyword;
4761
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4762
+ }
4763
+ case "TSOptionalType":
4764
+ {
4765
+ let visit = walkers.TSOptionalType;
4766
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4767
+ }
4768
+ case "TSTypeOperator":
4769
+ {
4770
+ let visit = walkers.TSTypeOperator;
4771
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4772
+ }
4773
+ case "ThisExpression":
4774
+ {
4775
+ let visit = walkers.ThisExpression;
4776
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4777
+ }
4778
+ case "ThrowStatement":
4779
+ {
4780
+ let visit = walkers.ThrowStatement;
4781
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4782
+ }
4783
+ case "WhileStatement":
4784
+ {
4785
+ let visit = walkers.WhileStatement;
4786
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4787
+ }
4788
+ }
4789
+ break;
4790
+ case 15:
4791
+ switch(type.charCodeAt(2)){
4792
+ case 66:
4793
+ if ("TSBigIntKeyword" === type) {
4794
+ let visit = walkers.TSBigIntKeyword;
4795
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4796
+ }
4797
+ break;
4798
+ case 73:
4799
+ if ("TSInterfaceBody" === type) {
4800
+ let visit = walkers.TSInterfaceBody;
4801
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4802
+ }
4803
+ break;
4804
+ case 78:
4805
+ if ("TSNumberKeyword" === type) {
4806
+ let visit = walkers.TSNumberKeyword;
4807
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4808
+ }
4809
+ break;
4810
+ case 79:
4811
+ if ("TSObjectKeyword" === type) {
4812
+ let visit = walkers.TSObjectKeyword;
4813
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4814
+ }
4815
+ break;
4816
+ case 81:
4817
+ if ("TSQualifiedName" === type) {
4818
+ let visit = walkers.TSQualifiedName;
4819
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4820
+ }
4821
+ break;
4822
+ case 83:
4823
+ switch(type){
4824
+ case "TSStringKeyword":
4825
+ {
4826
+ let visit = walkers.TSStringKeyword;
4827
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4828
+ }
4829
+ case "TSSymbolKeyword":
4830
+ {
4831
+ let visit = walkers.TSSymbolKeyword;
4832
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4833
+ }
4834
+ }
4835
+ break;
4836
+ case 84:
4837
+ switch(type){
4838
+ case "TSTypeAssertion":
4839
+ {
4840
+ let visit = walkers.TSTypeAssertion;
4841
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4842
+ }
4843
+ case "TSTypeParameter":
4844
+ {
4845
+ let visit = walkers.TSTypeParameter;
4846
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4847
+ }
4848
+ case "TSTypePredicate":
4849
+ {
4850
+ let visit = walkers.TSTypePredicate;
4851
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4852
+ }
4853
+ case "TSTypeReference":
4854
+ {
4855
+ let visit = walkers.TSTypeReference;
4856
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4857
+ }
4858
+ }
4859
+ break;
4860
+ case 97:
4861
+ switch(type){
4862
+ case "AwaitExpression":
4863
+ {
4864
+ let visit = walkers.AwaitExpression;
4865
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4866
+ }
4867
+ case "ChainExpression":
4868
+ {
4869
+ let visit = walkers.ChainExpression;
4870
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4871
+ }
4872
+ case "ClassExpression":
4873
+ {
4874
+ let visit = walkers.ClassExpression;
4875
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4876
+ }
4877
+ case "UnaryExpression":
4878
+ {
4879
+ let visit = walkers.UnaryExpression;
4880
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4881
+ }
4882
+ }
4883
+ break;
4884
+ case 101:
4885
+ if ("YieldExpression" === type) {
4886
+ let visit = walkers.YieldExpression;
4887
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4888
+ }
4889
+ break;
4890
+ case 105:
4891
+ if ("SwitchStatement" === type) {
4892
+ let visit = walkers.SwitchStatement;
4893
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4894
+ }
4895
+ break;
4896
+ case 109:
4897
+ switch(type){
4898
+ case "TemplateElement":
4899
+ {
4900
+ let visit = walkers.TemplateElement;
4901
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4902
+ }
4903
+ case "TemplateLiteral":
4904
+ {
4905
+ let visit = walkers.TemplateLiteral;
4906
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4907
+ }
4908
+ }
4909
+ break;
4910
+ case 112:
4911
+ switch(type){
4912
+ case "ExportSpecifier":
4913
+ {
4914
+ let visit = walkers.ExportSpecifier;
4915
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4916
+ }
4917
+ case "ImportAttribute":
4918
+ {
4919
+ let visit = walkers.ImportAttribute;
4920
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4921
+ }
4922
+ case "ImportSpecifier":
4923
+ {
4924
+ let visit = walkers.ImportSpecifier;
4925
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4926
+ }
4927
+ }
4928
+ break;
4929
+ case 114:
4930
+ if ("ArrayExpression" === type) {
4931
+ let visit = walkers.ArrayExpression;
4932
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4933
+ }
4934
+ break;
4935
+ case 116:
4936
+ if ("ReturnStatement" === type) {
4937
+ let visit = walkers.ReturnStatement;
4938
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4939
+ }
4940
+ }
4941
+ break;
4942
+ case 16:
4943
+ switch(type){
4944
+ case "AccessorProperty":
4945
+ {
4946
+ let visit = walkers.AccessorProperty;
4947
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4948
+ }
4949
+ case "BinaryExpression":
4950
+ {
4951
+ let visit = walkers.BinaryExpression;
4952
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4953
+ }
4954
+ case "ClassDeclaration":
4955
+ {
4956
+ let visit = walkers.ClassDeclaration;
4957
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4958
+ }
4959
+ case "DoWhileStatement":
4960
+ {
4961
+ let visit = walkers.DoWhileStatement;
4962
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4963
+ }
4964
+ case "ImportExpression":
4965
+ {
4966
+ let visit = walkers.ImportExpression;
4967
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4968
+ }
4969
+ case "LabeledStatement":
4970
+ {
4971
+ let visit = walkers.LabeledStatement;
4972
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4973
+ }
4974
+ case "MemberExpression":
4975
+ {
4976
+ let visit = walkers.MemberExpression;
4977
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4978
+ }
4979
+ case "MethodDefinition":
4980
+ {
4981
+ let visit = walkers.MethodDefinition;
4982
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4983
+ }
4984
+ case "ObjectExpression":
4985
+ {
4986
+ let visit = walkers.ObjectExpression;
4987
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4988
+ }
4989
+ case "TSBooleanKeyword":
4990
+ {
4991
+ let visit = walkers.TSBooleanKeyword;
4992
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4993
+ }
4994
+ case "TSIndexSignature":
4995
+ {
4996
+ let visit = walkers.TSIndexSignature;
4997
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
4998
+ }
4999
+ case "TSTypeAnnotation":
5000
+ {
5001
+ let visit = walkers.TSTypeAnnotation;
5002
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5003
+ }
5004
+ case "TSUnknownKeyword":
5005
+ {
5006
+ let visit = walkers.TSUnknownKeyword;
5007
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5008
+ }
5009
+ case "UpdateExpression":
5010
+ {
5011
+ let visit = walkers.UpdateExpression;
5012
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5013
+ }
5014
+ }
5015
+ break;
5016
+ case 17:
5017
+ switch(type){
5018
+ case "AssignmentPattern":
5019
+ {
5020
+ let visit = walkers.AssignmentPattern;
5021
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5022
+ }
5023
+ case "ContinueStatement":
5024
+ {
5025
+ let visit = walkers.ContinueStatement;
5026
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5027
+ }
5028
+ case "DebuggerStatement":
5029
+ {
5030
+ let visit = walkers.DebuggerStatement;
5031
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5032
+ }
5033
+ case "ImportDeclaration":
5034
+ {
5035
+ let visit = walkers.ImportDeclaration;
5036
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5037
+ }
5038
+ case "JSXClosingElement":
5039
+ {
5040
+ let visit = walkers.JSXClosingElement;
5041
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5042
+ }
5043
+ case "JSXNamespacedName":
5044
+ {
5045
+ let visit = walkers.JSXNamespacedName;
5046
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5047
+ }
5048
+ case "JSXOpeningElement":
5049
+ {
5050
+ let visit = walkers.JSXOpeningElement;
5051
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5052
+ }
5053
+ case "LogicalExpression":
5054
+ {
5055
+ let visit = walkers.LogicalExpression;
5056
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5057
+ }
5058
+ case "PrivateIdentifier":
5059
+ {
5060
+ let visit = walkers.PrivateIdentifier;
5061
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5062
+ }
5063
+ case "TSClassImplements":
5064
+ {
5065
+ let visit = walkers.TSClassImplements;
5066
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5067
+ }
5068
+ case "TSConditionalType":
5069
+ {
5070
+ let visit = walkers.TSConditionalType;
5071
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5072
+ }
5073
+ case "TSConstructorType":
5074
+ {
5075
+ let visit = walkers.TSConstructorType;
5076
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5077
+ }
5078
+ case "TSDeclareFunction":
5079
+ {
5080
+ let visit = walkers.TSDeclareFunction;
5081
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5082
+ }
5083
+ case "TSEnumDeclaration":
5084
+ {
5085
+ let visit = walkers.TSEnumDeclaration;
5086
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5087
+ }
5088
+ case "TSMethodSignature":
5089
+ {
5090
+ let visit = walkers.TSMethodSignature;
5091
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5092
+ }
5093
+ }
5094
+ break;
5095
+ case 18:
5096
+ switch(type){
5097
+ case "FunctionExpression":
5098
+ {
5099
+ let visit = walkers.FunctionExpression;
5100
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5101
+ }
5102
+ case "JSXClosingFragment":
5103
+ {
5104
+ let visit = walkers.JSXClosingFragment;
5105
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5106
+ }
5107
+ case "JSXEmptyExpression":
5108
+ {
5109
+ let visit = walkers.JSXEmptyExpression;
5110
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5111
+ }
5112
+ case "JSXOpeningFragment":
5113
+ {
5114
+ let visit = walkers.JSXOpeningFragment;
5115
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5116
+ }
5117
+ case "JSXSpreadAttribute":
5118
+ {
5119
+ let visit = walkers.JSXSpreadAttribute;
5120
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5121
+ }
5122
+ case "PropertyDefinition":
5123
+ {
5124
+ let visit = walkers.PropertyDefinition;
5125
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5126
+ }
5127
+ case "SequenceExpression":
5128
+ {
5129
+ let visit = walkers.SequenceExpression;
5130
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5131
+ }
5132
+ case "TSExportAssignment":
5133
+ {
5134
+ let visit = walkers.TSExportAssignment;
5135
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5136
+ }
5137
+ case "TSIntersectionType":
5138
+ {
5139
+ let visit = walkers.TSIntersectionType;
5140
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5141
+ }
5142
+ case "TSIntrinsicKeyword":
5143
+ {
5144
+ let visit = walkers.TSIntrinsicKeyword;
5145
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5146
+ }
5147
+ case "TSJSDocUnknownType":
5148
+ {
5149
+ let visit = walkers.TSJSDocUnknownType;
5150
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5151
+ }
5152
+ case "TSNamedTupleMember":
5153
+ {
5154
+ let visit = walkers.TSNamedTupleMember;
5155
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5156
+ }
5157
+ case "TSUndefinedKeyword":
5158
+ {
5159
+ let visit = walkers.TSUndefinedKeyword;
5160
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5161
+ }
5162
+ case "VariableDeclarator":
5163
+ {
5164
+ let visit = walkers.VariableDeclarator;
5165
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5166
+ }
5167
+ }
5168
+ break;
5169
+ case 19:
5170
+ switch(type){
5171
+ case "ExpressionStatement":
5172
+ {
5173
+ let visit = walkers.ExpressionStatement;
5174
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5175
+ }
5176
+ case "FunctionDeclaration":
5177
+ {
5178
+ let visit = walkers.FunctionDeclaration;
5179
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5180
+ }
5181
+ case "JSXMemberExpression":
5182
+ {
5183
+ let visit = walkers.JSXMemberExpression;
5184
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5185
+ }
5186
+ case "TSIndexedAccessType":
5187
+ {
5188
+ let visit = walkers.TSIndexedAccessType;
5189
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5190
+ }
5191
+ case "TSInterfaceHeritage":
5192
+ {
5193
+ let visit = walkers.TSInterfaceHeritage;
5194
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5195
+ }
5196
+ case "TSJSDocNullableType":
5197
+ {
5198
+ let visit = walkers.TSJSDocNullableType;
5199
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5200
+ }
5201
+ case "TSModuleDeclaration":
5202
+ {
5203
+ let visit = walkers.TSModuleDeclaration;
5204
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5205
+ }
5206
+ case "TSNonNullExpression":
5207
+ {
5208
+ let visit = walkers.TSNonNullExpression;
5209
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5210
+ }
5211
+ case "TSParameterProperty":
5212
+ {
5213
+ let visit = walkers.TSParameterProperty;
5214
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5215
+ }
5216
+ case "TSParenthesizedType":
5217
+ {
5218
+ let visit = walkers.TSParenthesizedType;
5219
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5220
+ }
5221
+ case "TSPropertySignature":
5222
+ {
5223
+ let visit = walkers.TSPropertySignature;
5224
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5225
+ }
5226
+ case "VariableDeclaration":
5227
+ {
5228
+ let visit = walkers.VariableDeclaration;
5229
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5230
+ }
5231
+ }
5232
+ break;
5233
+ case 20:
5234
+ switch(type){
5235
+ case "AssignmentExpression":
5236
+ {
5237
+ let visit = walkers.AssignmentExpression;
5238
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5239
+ }
5240
+ case "ExportAllDeclaration":
5241
+ {
5242
+ let visit = walkers.ExportAllDeclaration;
5243
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5244
+ }
5245
+ }
5246
+ break;
5247
+ case 21:
5248
+ switch(type){
5249
+ case "ConditionalExpression":
5250
+ {
5251
+ let visit = walkers.ConditionalExpression;
5252
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5253
+ }
5254
+ case "TSSatisfiesExpression":
5255
+ {
5256
+ let visit = walkers.TSSatisfiesExpression;
5257
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5258
+ }
5259
+ case "TSTemplateLiteralType":
5260
+ {
5261
+ let visit = walkers.TSTemplateLiteralType;
5262
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5263
+ }
5264
+ }
5265
+ break;
5266
+ case 22:
5267
+ switch(type){
5268
+ case "ExportNamedDeclaration":
5269
+ {
5270
+ let visit = walkers.ExportNamedDeclaration;
5271
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5272
+ }
5273
+ case "ImportDefaultSpecifier":
5274
+ {
5275
+ let visit = walkers.ImportDefaultSpecifier;
5276
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5277
+ }
5278
+ case "JSXExpressionContainer":
5279
+ {
5280
+ let visit = walkers.JSXExpressionContainer;
5281
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5282
+ }
5283
+ case "TSInterfaceDeclaration":
5284
+ {
5285
+ let visit = walkers.TSInterfaceDeclaration;
5286
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5287
+ }
5288
+ case "TSJSDocNonNullableType":
5289
+ {
5290
+ let visit = walkers.TSJSDocNonNullableType;
5291
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5292
+ }
5293
+ case "TSTypeAliasDeclaration":
5294
+ {
5295
+ let visit = walkers.TSTypeAliasDeclaration;
5296
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5297
+ }
5298
+ }
5299
+ break;
5300
+ case 23:
5301
+ switch(type){
5302
+ case "ArrowFunctionExpression":
5303
+ {
5304
+ let visit = walkers.ArrowFunctionExpression;
5305
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5306
+ }
5307
+ case "ParenthesizedExpression":
5308
+ {
5309
+ let visit = walkers.ParenthesizedExpression;
5310
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5311
+ }
5312
+ }
5313
+ break;
5314
+ case 24:
5315
+ switch(type){
5316
+ case "ExportDefaultDeclaration":
5317
+ {
5318
+ let visit = walkers.ExportDefaultDeclaration;
5319
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5320
+ }
5321
+ case "ImportNamespaceSpecifier":
5322
+ {
5323
+ let visit = walkers.ImportNamespaceSpecifier;
5324
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5325
+ }
5326
+ case "TaggedTemplateExpression":
5327
+ {
5328
+ let visit = walkers.TaggedTemplateExpression;
5329
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5330
+ }
5331
+ }
5332
+ break;
5333
+ case 25:
5334
+ switch(type){
5335
+ case "TSExternalModuleReference":
5336
+ {
5337
+ let visit = walkers.TSExternalModuleReference;
5338
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5339
+ }
5340
+ case "TSImportEqualsDeclaration":
5341
+ {
5342
+ let visit = walkers.TSImportEqualsDeclaration;
5343
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5344
+ }
5345
+ case "TSInstantiationExpression":
5346
+ {
5347
+ let visit = walkers.TSInstantiationExpression;
5348
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5349
+ }
5350
+ }
5351
+ break;
5352
+ case 26:
5353
+ switch(type){
5354
+ case "TSAbstractAccessorProperty":
5355
+ {
5356
+ let visit = walkers.TSAbstractAccessorProperty;
5357
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5358
+ }
5359
+ case "TSAbstractMethodDefinition":
5360
+ {
5361
+ let visit = walkers.TSAbstractMethodDefinition;
5362
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5363
+ }
5364
+ case "TSCallSignatureDeclaration":
5365
+ {
5366
+ let visit = walkers.TSCallSignatureDeclaration;
5367
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5368
+ }
5369
+ case "TSTypeParameterDeclaration":
5370
+ {
5371
+ let visit = walkers.TSTypeParameterDeclaration;
5372
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5373
+ }
5374
+ }
5375
+ break;
5376
+ case 28:
5377
+ switch(type){
5378
+ case "TSAbstractPropertyDefinition":
5379
+ {
5380
+ let visit = walkers.TSAbstractPropertyDefinition;
5381
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5382
+ }
5383
+ case "TSNamespaceExportDeclaration":
5384
+ {
5385
+ let visit = walkers.TSNamespaceExportDeclaration;
5386
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5387
+ }
5388
+ case "TSTypeParameterInstantiation":
5389
+ {
5390
+ let visit = walkers.TSTypeParameterInstantiation;
5391
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5392
+ }
5393
+ }
5394
+ break;
5395
+ case 29:
5396
+ if ("TSEmptyBodyFunctionExpression" === type) {
5397
+ let visit = walkers.TSEmptyBodyFunctionExpression;
5398
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5399
+ }
5400
+ break;
5401
+ case 31:
5402
+ if ("TSConstructSignatureDeclaration" === type) {
5403
+ let visit = walkers.TSConstructSignatureDeclaration;
5404
+ return null === visit ? index : visit(node, walker, parent, key, list, index);
5405
+ }
5406
+ }
5407
+ throw TypeError(`Unsupported AST node type: ${type}`);
5408
+ }(node, this, parent, key, list, index, this.#walkers);
5409
+ }
5410
+ leaveChanged(node, parent, key, list, index) {
5411
+ let entry = this.#dispatch[node.type];
5412
+ void 0 === entry && assertNode(node);
5413
+ let leave = entry.leave ?? this.#globalLeave;
5414
+ return null === leave ? index : (this.#prepare(node, parent, key, list, index, 0), this.invoke(leave, this.#storage, "leave"), this.#storage.index);
5415
+ }
5416
+ visitLeaveHooks(node, parent, key, list, index) {
5417
+ let handlers = this.#dispatch[node.type], type = node.type;
5418
+ return null !== handlers.children && (handlers.children(node, this), this.stopped) ? index : node.type !== type ? this.leaveChanged(node, parent, key, list, index) : (this.#prepare(node, parent, key, list, index, 0), this.invoke(handlers.leave ?? this.#globalLeave, this.#storage, "leave"), this.#storage.index);
5419
+ }
5420
+ visitHooks(node, parent, key, list, index) {
5421
+ let handlers = this.#dispatch[node.type], enter = handlers.enter ?? this.#globalEnter, frame = this.#storage, type = node.type, after = 0, skip = !1;
5422
+ if (null !== enter) {
5423
+ if (this.#prepare(node, parent, key, list, index, 0), this.invoke(enter, frame, "enter"), index = frame.index, this.stopped || 2 & frame.flags) return index;
5424
+ node = frame.node, after = frame.after, skip = 1 & frame.flags, node.type !== type && (type = node.type, void 0 === (handlers = this.#dispatch[type]) && assertNode(node));
5425
+ }
5426
+ if (!skip && null !== handlers.children && (handlers.children(node, this), this.stopped)) return index;
5427
+ node.type !== type && void 0 === (handlers = this.#dispatch[node.type]) && assertNode(node);
5428
+ let leave = handlers.leave ?? this.#globalLeave;
5429
+ return null !== leave && (this.#prepare(node, parent, key, list, index, after), this.invoke(leave, frame, "leave"), index = frame.index), index;
5430
+ }
5431
+ }
5432
+ function recursive(node, state, visitors) {
5433
+ let compiled, hooks = {};
5434
+ for (let type of Object.keys(visitors)){
5435
+ let visitor = visitors[type];
5436
+ visitor && (hooks[type] = (child, context)=>{
5437
+ context.skip(), visitor(child, context.state, visit);
5438
+ });
5439
+ }
5440
+ let walker = (compiled = function(hooks) {
5441
+ let enter, leave;
5442
+ if (!hooks || "object" != typeof hooks) throw TypeError("Expected a hooks object");
5443
+ let entries = Object.entries(hooks), table = new Map(), add = (name, value)=>{
5444
+ let pair = "function" == typeof value ? {
5445
+ enter: value
5446
+ } : value;
5447
+ if (!pair || "object" != typeof pair) throw TypeError(`Invalid hook: ${name}`);
5448
+ for (let key of Object.keys(pair))if ("enter" !== key && "leave" !== key || void 0 !== pair[key] && "function" != typeof pair[key]) throw TypeError(`Invalid hook: ${name}.${key}`);
5449
+ let entry = table.get(name) ?? {
5450
+ enter: [],
5451
+ leave: []
5452
+ };
5453
+ pair.enter && entry.enter.push(pair.enter), pair.leave && entry.leave.unshift(pair.leave), table.set(name, entry);
5454
+ };
5455
+ for (let [name, value] of entries)if (void 0 !== value) {
5456
+ if ("enter" === name || "leave" === name) {
5457
+ if ("function" != typeof value) throw TypeError(`Invalid hook: ${name}`);
5458
+ "enter" === name ? enter = value : leave = value;
5459
+ } else if (!owns(aliases, name) && !isNodeType(name)) throw TypeError(`Unknown AST hook: ${name}`);
5460
+ }
5461
+ for (let [name, value] of entries)if (void 0 !== value && owns(aliases, name)) for (let type of aliases[name])add(type, value);
5462
+ for (let [name, value] of entries)void 0 !== value && isNodeType(name) && add(name, value);
5463
+ for (let pair of table.values())enter && pair.enter.unshift(enter), leave && pair.leave.push(leave);
5464
+ let compact = (handlers)=>0 === handlers.length ? null : 1 === handlers.length ? handlers[0] : handlers, dispatch = 0 === table.size ? baseDispatch : Object.create(baseDispatch);
5465
+ for (let [type, pair] of table)dispatch[type] = {
5466
+ children: childVisitors[type],
5467
+ enter: compact(pair.enter),
5468
+ leave: compact(pair.leave)
5469
+ };
5470
+ let walkers = Object.create(nodeWalkers);
5471
+ for (let type of enter || leave ? Object.keys(nodeWalkers) : [
5472
+ ...table.keys()
5473
+ ]){
5474
+ let entry = dispatch[type], enterHook = entry.enter ?? enter ?? null, leaveHook = entry.leave ?? leave ?? null;
5475
+ (null !== enterHook || null !== leaveHook) && (walkers[type] = null === enterHook ? walkLeave : walkEnter);
5476
+ }
5477
+ return {
5478
+ dispatch,
5479
+ walkers,
5480
+ globalEnter: enter ?? null,
5481
+ globalLeave: leave ?? null
5482
+ };
5483
+ }(hooks), Object.freeze({
5484
+ walk (root, state) {
5485
+ assertNode(root);
5486
+ let ctx = new WalkContext(state, compiled);
5487
+ try {
5488
+ ctx.visit(root, null, null, null, 0);
5489
+ } finally{
5490
+ ctx.reset();
5491
+ }
5492
+ return root;
5493
+ }
5494
+ }));
5495
+ function visit(child, childState) {
5496
+ walker.walk(child, childState);
5497
+ }
5498
+ visit(node, state);
2500
5499
  }
2501
5500
  function getDefaultImports(node) {
2502
5501
  return node.body.filter((statement)=>{
@@ -2543,7 +5542,8 @@ let parser = {
2543
5542
  lang: 'js',
2544
5543
  preserveParens: !1,
2545
5544
  comments: 'none',
2546
- semanticErrors: !0
5545
+ semanticErrors: !0,
5546
+ errorRecovery: !0
2547
5547
  }), diagnostic = result.diagnostics.find((item)=>'error' === item.severity);
2548
5548
  if (diagnostic) throw SyntaxError(diagnostic.message);
2549
5549
  return result.program;