fix: restore full typecheck stability

This commit is contained in:
Misaka
2026-03-21 09:17:58 +08:00
parent 08bd2cb7d5
commit 2fba07fd8f
13 changed files with 114 additions and 130 deletions

View File

@@ -19,19 +19,12 @@ import { registerUpdateHandlers } from './update-handler'
import { createLogger, logError } from '../services/logger'
import { serializeError, sanitizeError } from '../services/logger/error-utils'
import { getErrorMessage, getErrorCode, isBaseError } from '../types/errors'
import type { IpcResult } from '../types/ipc.types'
export type { IpcResult } from '../types/ipc.types'
const log = createLogger('IPC')
/**
* Standard result type for all IPC handlers
*/
export interface IpcResult<T = unknown> {
success: boolean
data?: T
error?: string
code?: string
}
export function ok<T>(data: T): IpcResult<T> {
return { success: true, data }
}