mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-11-10 04:46:07 -08:00
refactor(main): move IPC, CLI and app-ready wiring into assemblies (#311)
This commit is contained in:
1 parent
655510cf2e
commit
696462a82e
33 files changed
+3719
-2101
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import type { RegisterIpcRuntimeServicesParams } from '../ipc-runtime';
|
||||
import type { CliCommandContextMainDeps } from '../runtime/cli-command-context-factory';
|
||||
|
||||
/** Renderer IPC handlers, minus the two the IPC composer builds itself. */
|
||||
export type IpcHandlerDeps = Omit<
|
||||
RegisterIpcRuntimeServicesParams['mainDeps'],
|
||||
'handleMpvCommand' | 'runSubsyncManual'
|
||||
>;
|
||||
|
||||
/**
|
||||
* The IPC handlers one assembly provides. `Required` because most handlers are optional on
|
||||
* the registration params, and a slice must not drop one silently.
|
||||
*/
|
||||
export type IpcSlice<K extends keyof IpcHandlerDeps> = Required<Pick<IpcHandlerDeps, K>>;
|
||||
|
||||
/** The CLI command handlers one assembly provides. */
|
||||
export type CliSlice<K extends keyof CliCommandContextMainDeps> = Required<
|
||||
Pick<CliCommandContextMainDeps, K>
|
||||
>;
|
||||
Reference in new issue
Block a user