This commit is contained in:
lalBi94
2023-03-05 13:23:23 +01:00
commit 7bc56c09b5
14034 changed files with 1834369 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import * as t from "@babel/types";
export default function generateAsserts() {
let output = `/*
* This file is auto-generated! Do not modify it directly.
* To re-generate run 'make build'
*/
import * as t from "@babel/types";
import NodePath from "../index";
export interface NodePathAssetions {`;
for (const type of [...t.TYPES].sort()) {
output += `
assert${type}(
opts?: object,
): asserts this is NodePath<t.${type}>;`;
}
output += `
}`;
return output;
}

View File

@@ -0,0 +1,27 @@
import * as t from "@babel/types";
export default function generateValidators() {
let output = `/*
* This file is auto-generated! Do not modify it directly.
* To re-generate run 'make build'
*/
import type * as t from "@babel/types";
import type NodePath from "../index";
import type { VirtualTypeNodePathValidators } from "../lib/virtual-types-validator";
interface BaseNodePathValidators {
`;
for (const type of [...t.TYPES].sort()) {
output += `is${type}<T extends t.Node>(this: NodePath<T>, opts?: object): this is NodePath<T & t.${type}>;`;
}
output += `
}
export interface NodePathValidators
extends BaseNodePathValidators, VirtualTypeNodePathValidators {}
`;
return output;
}

1
node_modules/@babel/traverse/scripts/package.json generated vendored Normal file
View File

@@ -0,0 +1 @@
{ "type": "module" }