Skip to content

Commit

Permalink
chore: typecheck dep on all @types
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alexeagle committed Jun 11, 2024
1 parent cf28458 commit cafe67c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
6 changes: 2 additions & 4 deletions frontend/next.js/pages/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
Expand All @@ -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",
],
)
Expand Down
5 changes: 1 addition & 4 deletions frontend/packages/one/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions frontend/react/src/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
],
)

Expand Down

0 comments on commit cafe67c

Please sign in to comment.