diff --git a/packages/ast-spec/src/base/BaseNode.ts b/packages/ast-spec/src/base/BaseNode.ts index 797b3d35132..6c753efd731 100644 --- a/packages/ast-spec/src/base/BaseNode.ts +++ b/packages/ast-spec/src/base/BaseNode.ts @@ -3,6 +3,8 @@ import type { AST_NODE_TYPES } from '../ast-node-types'; import type { NodeOrTokenData } from './NodeOrTokenData'; export interface BaseNode extends NodeOrTokenData { + type: AST_NODE_TYPES; + /** * The parent node of the current node * @@ -10,6 +12,4 @@ export interface BaseNode extends NodeOrTokenData { * while traversing. */ // parent?: Node; - - type: AST_NODE_TYPES; } diff --git a/packages/types/package.json b/packages/types/package.json index c0d527a45cd..db7b9e35cad 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -33,7 +33,7 @@ "build": "tsc -b tsconfig.build.json", "postbuild": "downlevel-dts dist _ts3.4/dist", "clean": "tsc -b tsconfig.build.json --clean", - "postclean": "rimraf dist && rimraf _ts3.4 && rimraf coverage", + "postclean": "rimraf dist && rimraf src/generated && rimraf _ts3.4 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "generate:lib": "../../node_modules/.bin/ts-node --files --transpile-only ../scope-manager/tools/generate-lib.ts", "lint": "nx lint", diff --git a/tools/postinstall.ts b/tools/postinstall.ts index b222b290e68..badd3f0137a 100644 --- a/tools/postinstall.ts +++ b/tools/postinstall.ts @@ -21,7 +21,10 @@ void (async function (): Promise { // Install git hooks await $`yarn husky install`; - // // Build all the packages ready for use + // Clean any caches that may be invalid now + await $`yarn clean`; + + // Build all the packages ready for use await $`yarn build`; })();