Skip to content

Commit c6ee422

Browse files
committed
Add window declaration
1 parent 660484f commit c6ee422

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

javascript/packages/dev-tools/src/index.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,18 @@ if (typeof window !== "undefined" && typeof document !== "undefined") {
115115
document.addEventListener("turbo:visit", initializeDevTools)
116116
}
117117

118+
declare global {
119+
interface Window {
120+
ReActionViewDevTools: {
121+
init: typeof initReActionViewDevTools
122+
ReActionViewDevTools: typeof ReActionViewDevTools
123+
HerbOverlay: typeof HerbOverlay
124+
}
125+
}
126+
}
127+
118128
if (typeof window !== "undefined") {
119-
(window as any).ReActionViewDevTools = {
129+
window.ReActionViewDevTools = {
120130
init: initReActionViewDevTools,
121131
ReActionViewDevTools,
122132
HerbOverlay

javascript/packages/dev-tools/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
},
1414
"include": ["src/**/*"],
1515
"exclude": ["node_modules", "dist"]
16-
}
16+
}

0 commit comments

Comments
 (0)