refactor: reorganize imports and update type references across services
- Updated import paths for types and utilities in config-service, menu-service, script-execution-service, script-store-service, and window-service to reflect new structure. - Moved utility functions like debounce and cloneDeep to shared utilities. - Created new runtime and script types files to centralize type definitions. - Removed deprecated task-types and locale messages files. - Updated constants to use shared definitions and added new placeholders for providers. - Enhanced provider type information with additional placeholders for different languages.
This commit is contained in:
11
global.d.ts
vendored
11
global.d.ts
vendored
@@ -1,8 +1,9 @@
|
||||
import { IPC_EVENTS } from '@runtime/lib/constants'
|
||||
import type { ConfigKeys } from '@runtime/lib/types'
|
||||
import type { AutomationScript, ScriptSaveInput, ScriptExecutionResult } from '@runtime/lib/script-types'
|
||||
import { CONFIG_KEYS, IPC_EVENTS } from '@runtime/lib/constants'
|
||||
import type { AutomationScript, ScriptSaveInput, ScriptExecutionResult } from '@src/lib/script-types'
|
||||
|
||||
declare global {
|
||||
type ConfigKeys = `${CONFIG_KEYS}`
|
||||
|
||||
// 定义每个通道的参数和返回值类型
|
||||
interface IPCTypings {
|
||||
// 同步通信
|
||||
@@ -42,6 +43,10 @@ declare global {
|
||||
params: [event: any]
|
||||
return: void
|
||||
}
|
||||
[IPC_EVENTS.HOST_API_FETCH]: {
|
||||
params: [request: { path: string; method?: string; headers?: Record<string, string>; body?: unknown }]
|
||||
return: Promise<unknown>
|
||||
}
|
||||
|
||||
// 任务事件
|
||||
[IPC_EVENTS.TASK_PROGRESS]: { params: [payload: any]; return: void; }
|
||||
|
||||
Reference in New Issue
Block a user