From 23b60dc1975db38c280d8a123aff97544d1673e0 Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期四, 09 六月 2022 15:34:21 +0800
Subject: [PATCH] TODO#139890 FAQ 常見問題 1-文案調整

---
 PAMapp/node_modules/@babel/traverse/scripts/generators/validators.js |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/PAMapp/node_modules/@babel/traverse/scripts/generators/validators.js b/PAMapp/node_modules/@babel/traverse/scripts/generators/validators.js
index a3ec31a..f0e4e23 100644
--- a/PAMapp/node_modules/@babel/traverse/scripts/generators/validators.js
+++ b/PAMapp/node_modules/@babel/traverse/scripts/generators/validators.js
@@ -1,6 +1,5 @@
 import t from "@babel/types";
 import virtualTypes from "../../lib/path/lib/virtual-types.js";
-import definitions from "@babel/types/lib/definitions/index.js";
 
 export default function generateValidators() {
   let output = `/*
@@ -21,10 +20,12 @@
   for (const type of Object.keys(virtualTypes)) {
     const { types } = virtualTypes[type];
     if (type[0] === "_") continue;
-    if (definitions.NODE_FIELDS[type] || definitions.FLIPPED_ALIAS_KEYS[type]) {
+    if (t.NODE_FIELDS[type] || t.FLIPPED_ALIAS_KEYS[type]) {
       output += `is${type}(opts?: object): this is NodePath<t.${type}>;`;
     } else if (types /* in VirtualTypeAliases */) {
       output += `is${type}(opts?: object): this is NodePath<VirtualTypeAliases["${type}"]>;`;
+    } else if (type === "Pure") {
+      output += `isPure(constantsOnly?: boolean): boolean;`;
     } else {
       // if it don't have types, then VirtualTypeAliases[type] is t.Node
       // which TS marked as always true

--
Gitblit v1.8.0