Open freben opened 4 months ago
A suitable patch-package
for these changes is ast-types+0.14.2.patch
:
diff --git a/node_modules/ast-types/main.d.ts b/node_modules/ast-types/main.d.ts
index 6b9a8d0..1010bb5 100644
--- a/node_modules/ast-types/main.d.ts
+++ b/node_modules/ast-types/main.d.ts
@@ -1,7 +1,7 @@
-import { ASTNode, Type, AnyType, Field } from "./lib/types";
-import { NodePath } from "./lib/node-path";
+import { ASTNode, type Type, AnyType, Field } from "./lib/types";
+import { type NodePath } from "./lib/node-path";
import { namedTypes } from "./gen/namedTypes";
-import { builders } from "./gen/builders";
+import { type builders } from "./gen/builders";
import { Visitor } from "./gen/visitor";
declare const astNodesAreEquivalent: {
(a: any, b: any, problemPath?: any): boolean;
Eventually, it looks like ast-types-x
could be a well-maintained replacement.
When upgrading to TypeScript 5.4+, importing from
ast-types
leads to type errors.Reproduction:
yarn install
yarn tsc:full
Result:
Obeying the instructions and explicitly making them type imports solves the problem: