This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a commit to branch chore/ts-migration-dashboard
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/chore/ts-migration-dashboard
by this push:
new 75f359ff1dd fix(calendar): replace ambient d3-selection declaration
with proper types
75f359ff1dd is described below
commit 75f359ff1dd9cd810efa8bdb13212c467874298b
Author: Evan Rusackas <[email protected]>
AuthorDate: Fri Feb 6 09:44:46 2026 -0800
fix(calendar): replace ambient d3-selection declaration with proper types
The calendar plugin's external.d.ts had `declare module 'd3-selection';`
which typed the entire module as `any`. This was a workaround for missing
types.
- Add @types/d3-selection as a dependency for proper type definitions
- Remove the ambient module declaration to match other plugin patterns
- Now the calendar plugin has proper d3-selection types instead of `any`
Co-Authored-By: Claude Opus 4.5 <[email protected]>
---
superset-frontend/package-lock.json | 7 +++++++
superset-frontend/package.json | 1 +
.../plugins/legacy-plugin-chart-calendar/types/external.d.ts | 2 --
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/superset-frontend/package-lock.json
b/superset-frontend/package-lock.json
index 74f3efc28d9..b40cafb3982 100644
--- a/superset-frontend/package-lock.json
+++ b/superset-frontend/package-lock.json
@@ -49,6 +49,7 @@
"@superset-ui/plugin-chart-word-cloud":
"file:./plugins/plugin-chart-word-cloud",
"@superset-ui/switchboard": "file:./packages/superset-ui-switchboard",
"@types/d3-format": "^3.0.1",
+ "@types/d3-selection": "^3.0.11",
"@types/d3-time-format": "^4.0.3",
"@types/react-google-recaptcha": "^2.1.9",
"@visx/axis": "^3.8.0",
@@ -19234,6 +19235,12 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/@types/d3-selection": {
+ "version": "3.0.11",
+ "resolved":
"https://registry.npmjs.org/@types/d3-selection/-/d3-selection-3.0.11.tgz",
+ "integrity":
"sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==",
+ "license": "MIT"
+ },
"node_modules/@types/d3-shape": {
"version": "1.3.12",
"resolved":
"https://registry.npmjs.org/@types/d3-shape/-/d3-shape-1.3.12.tgz",
diff --git a/superset-frontend/package.json b/superset-frontend/package.json
index fd59b7003cd..ca610a8fdf4 100644
--- a/superset-frontend/package.json
+++ b/superset-frontend/package.json
@@ -131,6 +131,7 @@
"@superset-ui/plugin-chart-word-cloud":
"file:./plugins/plugin-chart-word-cloud",
"@superset-ui/switchboard": "file:./packages/superset-ui-switchboard",
"@types/d3-format": "^3.0.1",
+ "@types/d3-selection": "^3.0.11",
"@types/d3-time-format": "^4.0.3",
"@types/react-google-recaptcha": "^2.1.9",
"@visx/axis": "^3.8.0",
diff --git
a/superset-frontend/plugins/legacy-plugin-chart-calendar/types/external.d.ts
b/superset-frontend/plugins/legacy-plugin-chart-calendar/types/external.d.ts
index fd3221d1a68..66677a600a6 100644
--- a/superset-frontend/plugins/legacy-plugin-chart-calendar/types/external.d.ts
+++ b/superset-frontend/plugins/legacy-plugin-chart-calendar/types/external.d.ts
@@ -26,5 +26,3 @@ declare module '*.jpg' {
const value: string;
export default value;
}
-
-declare module 'd3-selection';