Rename interface for honesty

Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Iku-tursoandJanne Savolainen authored and Janne Savolainen committed 2022-06-15 08:40:17 +03:00
1 parent 23f7d438f1
commit a0a181702d
2 files changed
+6 -6

No files matched your search

@@ -8,7 +8,7 @@ import applicationWindowStateInjectable from "./application-window-state.injecta
import { BrowserWindow } from "electron"; import { BrowserWindow } from "electron";
import { openBrowser } from "../../../../common/utils"; import { openBrowser } from "../../../../common/utils";
import sendToChannelInElectronBrowserWindowInjectable from "./send-to-channel-in-electron-browser-window.injectable"; import sendToChannelInElectronBrowserWindowInjectable from "./send-to-channel-in-electron-browser-window.injectable";
import type { LensWindow } from "./create-lens-window.injectable"; import type { ElectronWindow } from "./create-lens-window.injectable";
import type { RequireExactlyOne } from "type-fest"; import type { RequireExactlyOne } from "type-fest";
export type ElectronWindowTitleBarStyle = "hiddenInset" | "hidden" | "default" | "customButtonsOnHover"; export type ElectronWindowTitleBarStyle = "hiddenInset" | "hidden" | "default" | "customButtonsOnHover";
@@ -38,7 +38,7 @@ export interface ElectronWindowConfiguration {
onDomReady?: () => void; onDomReady?: () => void;
} }
export type CreateElectronWindow = () => Promise<LensWindow>; export type CreateElectronWindow = () => Promise<ElectronWindow>;
export type CreateElectronWindowFor = (config: ElectronWindowConfiguration) => CreateElectronWindow; export type CreateElectronWindowFor = (config: ElectronWindowConfiguration) => CreateElectronWindow;
function isFileSource(src: ContentSource): src is FileSource { function isFileSource(src: ContentSource): src is FileSource {
@@ -3,11 +3,11 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import type { SendToViewArgs } from "./lens-window-injection-token"; import type { LensWindow, SendToViewArgs } from "./lens-window-injection-token";
import type { ContentSource, ElectronWindowTitleBarStyle } from "./create-electron-window-for.injectable"; import type { ContentSource, ElectronWindowTitleBarStyle } from "./create-electron-window-for.injectable";
import createElectronWindowForInjectable from "./create-electron-window-for.injectable"; import createElectronWindowForInjectable from "./create-electron-window-for.injectable";
export interface LensWindow { export interface ElectronWindow {
show: () => void; show: () => void;
close: () => void; close: () => void;
send: (args: SendToViewArgs) => void; send: (args: SendToViewArgs) => void;
@@ -35,8 +35,8 @@ const createLensWindowInjectable = getInjectable({
instantiate: (di) => { instantiate: (di) => {
const createElectronWindowFor = di.inject(createElectronWindowForInjectable); const createElectronWindowFor = di.inject(createElectronWindowForInjectable);
return (configuration: LensWindowConfiguration) => { return (configuration: LensWindowConfiguration): LensWindow => {
let browserWindow: LensWindow | undefined; let browserWindow: ElectronWindow | undefined;
const createElectronWindow = createElectronWindowFor({ const createElectronWindow = createElectronWindowFor({
...configuration, ...configuration,