From cafe67cd5a081016187df3d0e3f1d5ca95c5842f Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Mon, 10 Jun 2024 20:08:36 -0700 Subject: [PATCH] chore: typecheck dep on all @types This is simpler for Gazelle to be able to generate, since TS by default includes all @types in compilation. Source code doesn't have to include any indication these 'ambient' types are required. --- frontend/next.js/pages/BUILD.bazel | 6 ++---- frontend/packages/one/BUILD.bazel | 5 +---- frontend/react/src/BUILD.bazel | 4 ++-- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/frontend/next.js/pages/BUILD.bazel b/frontend/next.js/pages/BUILD.bazel index a93360eaa..492aa99b5 100644 --- a/frontend/next.js/pages/BUILD.bazel +++ b/frontend/next.js/pages/BUILD.bazel @@ -20,9 +20,7 @@ ts_project( visibility = ["//next.js:__subpackages__"], deps = [ "//next.js:node_modules/@bazel-example/one", - "//next.js:node_modules/@types/is-even", - "//next.js:node_modules/@types/react", - "//next.js:node_modules/@types/react-dom", + "//next.js:node_modules/@types", "//next.js:node_modules/next", "//next.js/pages/api", ], @@ -38,7 +36,7 @@ ts_project( deps = [ "//next.js:node_modules/@testing-library/jest-dom", "//next.js:node_modules/@testing-library/react", - "//next.js:node_modules/@types/jest", + "//next.js:node_modules/@types", "//next.js/pages", ], ) diff --git a/frontend/packages/one/BUILD.bazel b/frontend/packages/one/BUILD.bazel index 401000d2b..8fef79946 100644 --- a/frontend/packages/one/BUILD.bazel +++ b/frontend/packages/one/BUILD.bazel @@ -14,10 +14,7 @@ ts_project( declaration = True, transpiler = "tsc", # transpile time direct dependencies - deps = [ - ":node_modules/@types/is-odd", - "//next.js:node_modules/@types/node", - ], + deps = [":node_modules/@types"], ) # make this library available via node_modules diff --git a/frontend/react/src/BUILD.bazel b/frontend/react/src/BUILD.bazel index 62ed6d250..25281aba9 100644 --- a/frontend/react/src/BUILD.bazel +++ b/frontend/react/src/BUILD.bazel @@ -23,7 +23,7 @@ ts_project( tsconfig = "//react:tsconfig", visibility = ["//react:__subpackages__"], deps = [ - "//react:node_modules/@types/react", + "//react:node_modules/@types", "//react:node_modules/react", "//react:node_modules/react-dom", "//react:node_modules/vite-plugin-svgr", @@ -43,7 +43,7 @@ ts_project( "//:node_modules/vitest", "//react:node_modules/@testing-library/jest-dom", "//react:node_modules/@testing-library/react", - "//react:node_modules/@types/jest", + "//react:node_modules/@types", ], )