[babel 8] Add "exports" to every package (#14013)
This commit is contained in:
@@ -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,7 +20,7 @@ export interface NodePathValidators {
|
||||
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}"]>;`;
|
||||
|
||||
Reference in New Issue
Block a user