mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
fix: typing errors
This commit is contained in:
parent
62c2649320
commit
6b93b6dc35
4 changed files with 6 additions and 17 deletions
4
src/app/core/window-ea.d.ts
vendored
4
src/app/core/window-ea.d.ts
vendored
|
|
@ -4,11 +4,9 @@
|
|||
import { ElectronAPI } from '../../../electron/electronAPI';
|
||||
|
||||
// Extend the existing Window interface declaration
|
||||
// Note: In test environment, this is declared as required in test.ts
|
||||
// In runtime, this may be undefined in web context
|
||||
declare global {
|
||||
interface Window {
|
||||
ea?: ElectronAPI | undefined;
|
||||
ea: ElectronAPI;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { saveAs } from 'file-saver';
|
|||
import { Directory, Encoding, Filesystem, WriteFileResult } from '@capacitor/filesystem';
|
||||
import { IS_ANDROID_WEB_VIEW } from './is-android-web-view';
|
||||
import { Log } from '../core/log';
|
||||
import '../core/window-ea';
|
||||
import '../core/window-ea.d';
|
||||
|
||||
const isRunningInSnap = (): boolean => {
|
||||
return !!window.ea?.isSnap?.();
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { environment } from './environments/environment';
|
|||
import { IS_ELECTRON, LanguageCode } from './app/app.constants';
|
||||
import { IS_ANDROID_WEB_VIEW } from './app/util/is-android-web-view';
|
||||
import { androidInterface } from './app/features/android/android-interface';
|
||||
import { ElectronAPI } from '../electron/electronAPI.d';
|
||||
import './app/core/window-ea.d';
|
||||
import { App as CapacitorApp } from '@capacitor/app';
|
||||
import { GlobalErrorHandler } from './app/core/error-handler/global-error-handler.class';
|
||||
import {
|
||||
|
|
@ -77,11 +77,7 @@ if (environment.production || environment.stage) {
|
|||
enableProdMode();
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
ea: ElectronAPI;
|
||||
}
|
||||
}
|
||||
// Window.ea declaration is in src/app/core/window-ea.d.ts
|
||||
|
||||
const createTranslateLoader = (http: HttpClient): TranslateHttpLoader =>
|
||||
new TranslateHttpLoader(http, './assets/i18n/', '.json');
|
||||
|
|
|
|||
|
|
@ -6,13 +6,8 @@ import {
|
|||
platformBrowserDynamicTesting,
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
import { provideExperimentalZonelessChangeDetection } from '@angular/core';
|
||||
import { ElectronAPI } from '../electron/electronAPI';
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
ea: ElectronAPI;
|
||||
}
|
||||
}
|
||||
// Import type definitions for window.ea
|
||||
import './app/core/window-ea.d';
|
||||
|
||||
beforeAll(() => {
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 2000;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue