mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-27 18:22:41 -08:00
feat(core): add Electron runtime, services, and app composition
This commit is contained in:
22
src/main/runtime/overlay-bootstrap-main-deps.ts
Normal file
22
src/main/runtime/overlay-bootstrap-main-deps.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import type { OverlayWindowResolver } from '../overlay-runtime';
|
||||
|
||||
type OverlayContentMeasurementStoreMainDeps = {
|
||||
now: () => number;
|
||||
warn: (message: string) => void;
|
||||
};
|
||||
|
||||
export function createBuildOverlayContentMeasurementStoreMainDepsHandler(
|
||||
deps: OverlayContentMeasurementStoreMainDeps,
|
||||
) {
|
||||
return (): OverlayContentMeasurementStoreMainDeps => ({
|
||||
now: () => deps.now(),
|
||||
warn: (message: string) => deps.warn(message),
|
||||
});
|
||||
}
|
||||
|
||||
export function createBuildOverlayModalRuntimeMainDepsHandler(deps: OverlayWindowResolver) {
|
||||
return (): OverlayWindowResolver => ({
|
||||
getMainWindow: () => deps.getMainWindow(),
|
||||
getInvisibleWindow: () => deps.getInvisibleWindow(),
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user