From 4f7a98bcd48136b23b4b5c18124b07824adffaf8 Mon Sep 17 00:00:00 2001
From: Max Frederiksen <maxfrederiksen@Maxs-MacBook-Air.local>
Date: Fri, 3 Jan 2025 14:44:34 +0100
Subject: [PATCH] Add global TS files and modify tsconfig.json

---
 declaration.d.ts |  5 +++++
 global.d.ts      | 14 ++++++++++++++
 tsconfig.json    |  5 +++--
 3 files changed, 22 insertions(+), 2 deletions(-)
 create mode 100644 declaration.d.ts
 create mode 100644 global.d.ts

diff --git a/declaration.d.ts b/declaration.d.ts
new file mode 100644
index 00000000..ff05c729
--- /dev/null
+++ b/declaration.d.ts
@@ -0,0 +1,5 @@
+declare module "*.svg?react" {
+  const content: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
+
+  export default content;
+}
diff --git a/global.d.ts b/global.d.ts
new file mode 100644
index 00000000..768e452c
--- /dev/null
+++ b/global.d.ts
@@ -0,0 +1,14 @@
+export {};
+
+declare global {
+  interface Window {
+    SERVER_ADDRESS: string;
+    ENVIRONMENT_TITLE: string;
+    API_BASE_ENDPOINT: string;
+    TOKEN_RENEW_INTERVAL: number;
+    FRONTEND_VERSION: string;
+    SUPPORT_URL: string;
+    NETBOX_ADDRESS: string;
+    NAMING_ADDRESS: string;
+  }
+}
diff --git a/tsconfig.json b/tsconfig.json
index d291f9f9..a1cf19d3 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -25,9 +25,10 @@
       "@testing-library/cypress",
       "@types/react",
       "@types/react-dom",
-      "vite/client"
+      "vite/client",
+      "msw"
     ]
   },
-  "include": ["src", "cypress.d.ts"],
+  "include": ["src", "cypress.d.ts", "./global.d.ts", "declaration.d.ts"],
   "exclude": ["node_modules", "build"]
 }
-- 
GitLab