فهرست منبع

[web] Move window object typescript declaration file to a more general location (#7244)

GitOrigin-RevId: 87e30b16fa48e1aaebba76bed19d8c583a4cf1ca
M Fahru 4 سال پیش
والد
کامیت
2fc4c82593
2فایلهای تغییر یافته به همراه12 افزوده شده و 1 حذف شده
  1. 2 1
      services/web/tsconfig.json
  2. 10 0
      services/web/types/window.ts

+ 2 - 1
services/web/tsconfig.json

@@ -16,6 +16,7 @@
     "frontend/js/**/*.*",
     "modules/**/frontend/js/**/*.*",
     "test/frontend/**/*.*",
-    "modules/**/test/frontend/**/*.*"
+    "modules/**/test/frontend/**/*.*",
+    "types"
   ]
 }

+ 10 - 0
services/web/types/window.ts

@@ -0,0 +1,10 @@
+declare global {
+  // eslint-disable-next-line no-unused-vars
+  interface Window {
+    sl_debugging: boolean
+    user: {
+      id: string
+    }
+  }
+}
+export {} // pretend this is a module