Skip to content

A local-first personal finance app

[AI] Move window typings import to globals.ts (#7142)

Matiss Janis Aboltinsfdf5c8d0a9e1
diff --git a/packages/desktop-client/src/globals.ts b/packages/desktop-client/src/globals.ts
new file mode 100644
index 0000000000..9a4173fa37
--- /dev/null
+++ b/packages/desktop-client/src/globals.ts
@@ -0,0 +1 @@
+import 'loot-core/typings/window';
diff --git a/packages/desktop-client/tsconfig.json b/packages/desktop-client/tsconfig.json
index 7927b0ea57..f7f84492f4 100644
--- a/packages/desktop-client/tsconfig.json
+++ b/packages/desktop-client/tsconfig.json
@@ -19,13 +19,7 @@
{ "path": "../loot-core" },
{ "path": "../component-library" }
],
- "include": [
- "src/**/*.ts",
- "src/**/*.tsx",
- "src/**/*.js",
- // TODO: remove loot-core dependency
- "../../packages/loot-core/typings/window.ts"
- ],
+ "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js"],
"exclude": [
"node_modules",
"build",
diff --git a/packages/loot-core/package.json b/packages/loot-core/package.json
index c09d26b840..c3a82ecbb2 100644
--- a/packages/loot-core/package.json
+++ b/packages/loot-core/package.json
@@ -49,6 +49,7 @@
"./shared/*": "./src/shared/*.ts",
"./types/models": "./src/types/models/index.ts",
"./types/*": "./src/types/*.ts",
+ "./typings/*": "./typings/*.ts",
"./lib-dist/electron/bundle.desktop.js": "./lib-dist/electron/bundle.desktop.js"
},
"scripts": {
diff --git a/upcoming-release-notes/7142.md b/upcoming-release-notes/7142.md
new file mode 100644
index 0000000000..b4f97fac78
--- /dev/null
+++ b/upcoming-release-notes/7142.md
@@ -0,0 +1,6 @@
+---
+category: Maintenance
+authors: [MatissJanis]
+---
+
+Refactor TypeScript typings by moving window import to globals.ts for cleaner configuration.